NSHTTPURLResponse(CLUNetworkAdditions)
@interface NSHTTPURLResponse (CLUNetworkAdditions)
NSHTTPURLResponse (CLUNetworkAdditions) category contains method to parse NSHTTPURLResponse properties and encode them into json like dictionary
To be able to include NSHTTPURLResponse properties into Clue report (for Network module)
Specifically method [NSHTTPURLResponse clue_responseProperties] use parent’s implementation to get basic response properties (NSHTTPURLResponse subclass of NSURLResponse) and add some NSHTTPURLResponse specific properties and return full dictionary
-
Generate HTTP URL response dictionary which includes properties from URL Response and statusCode, localizedStringForStatusCode, allHeaderFields for current
NSHTTPURLResponseobjectWarning
This method doesn’t have any input, it generates dictionary based on current
NSHTTPURLResponseobject@code {
class
:, MIMEType
:, URL
:, expectedContentLength
:, statusCode
:, localizedStringForStatusCode
:, allHeaderFields
:} Declaration
Objective-C
- (NSDictionary *)clue_responseProperties;Swift
func clue_responseProperties() -> [AnyHashable : Any]!Return Value
HTTP URL response dictionary with data from current
NSHTTPURLResponseobject
NSHTTPURLResponse(CLUNetworkAdditions) Category Reference