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.3+0a73c45f0c78941900e328c6c6b819597b665e00
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