-
Couldn't load subscription status.
- Fork 202
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationquestionFurther 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
documentationImprovements or additions to documentationImprovements or additions to documentationquestionFurther information is requestedFurther information is requested