HTTPResponse
CLASS
HTTPResponse
1public class HTTPResponse<Operation: GraphQLOperation>Data about a response received by an HTTP request.
Properties
httpResponse
1public var httpResponse: HTTPURLResponseThe HTTPURLResponse received from the URL loading system
rawData
1public var rawData: DataThe raw data received from the URL loading system
parsedResponse
1public var parsedResponse: GraphQLResult<Operation.Data>?[optional] The data as parsed into a GraphQLResult, which can eventually be returned to the UI. Will be nil if not yet parsed.
legacyResponse
1public var legacyResponse: GraphQLResponse<Operation.Data>? = nil[optional] The data as parsed into a GraphQLResponse for legacy caching purposes. If you're not using the JSONResponseParsingInterceptor, you probably shouldn't be using this property.
NOTE: This property will be removed when the transition to the Swift Codegen is complete.
Methods
init(response:rawData:parsedResponse:)
1public init(response: HTTPURLResponse,
2 rawData: Data,
3 parsedResponse: GraphQLResult<Operation.Data>?)Designated initializer
Parameters:
response: The
HTTPURLResponsereceived from the server.rawData: The raw, unparsed data received from the server.
parsedResponse: [optional] The response parsed into the
ParsedValuetype. Will be nil if not yet parsed, or if parsing failed.
Parameters
| Name | Description |
|---|---|
| response | The HTTPURLResponse received from the server. |
| rawData | The raw, unparsed data received from the server. |
| parsedResponse | [optional] The response parsed into the ParsedValue type. Will be nil if not yet parsed, or if parsing failed. |