-
Notifications
You must be signed in to change notification settings - Fork 193
Open
Labels
questionFurther information is requestedFurther information is requested
Description
In URLSessionInstrumentationConfiguration()
there is a parameter called receivedResponse
that takes response
, data
, and span
. It seems like, in my testing, that I don't receive any data when the response includes json data. Am I holding it wrong? Or is the library filtering out some of the responses?
let networkInstrumentation = URLSessionInstrumentation(
configuration: URLSessionInstrumentationConfiguration(
shouldInstrument: { request in
true
},
receivedResponse: { response, dataOrFile, span in
if let data = dataOrFile as? Data {
print("Data: ", String(data: data, encoding: .utf8) ?? "binary data")
} else {
print("dataOrFile is not data")
}
}
)
)
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested