Click or drag to resize

WikiaJsonResponseParserParseResponseAsync Method

This is preliminary documentation and is subject to change.

Parses the specified HTTP response message.

Namespace: WikiClientLibrary.Wikia
Assembly: WikiClientLibrary.Wikia (in WikiClientLibrary.Wikia.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax
public override Task<JsonNode> ParseResponseAsync(
	HttpResponseMessage response,
	WikiResponseParsingContext context
)

Parameters

response  HttpResponseMessage
The HTTP response message to parse.
context  WikiResponseParsingContext
The parsing context.

Return Value

TaskJsonNode
A strongly-typed object containing the desired response.
Remarks

This method does not check the HTTP status code, because for certain JSON responses, the status code might has its semantic meanings.

Then the content will be parsed as JSON, in JsonNode. If there is JsonException thrown while parsing the response, a retry will be requested.

The default implementation for this method throws a WikiaApiException or one of its derived exceptions when detected exception node in the JSON response. The exception mapping is as follows

exception.code valueMapped exception type
NotFoundApiExceptionNotFoundApiException
OthersWikiaApiException
See Also