Click or drag to resize

IWikiResponseMessageParserTParseResponseAsync Method

This is preliminary documentation and is subject to change.

Parses the specified HTTP response message.

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

Parameters

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

Return Value

TaskObject
The task that will return the parsed value. The parsed value should be able to be converted to T.
Exceptions
ExceptionCondition
ArgumentNullExceptionEither response or context is null.
ExceptionAn exception occurred when parsing the response. Setting context.NeedRetry to true to request for a retry.
Remarks

The implementation should check StatusCode first, then parse the content.

If context.NeedRetry is set to true, then the invoker should attempt to retry first, even if the returned Task throws an exception. However, the caller may regardless throw the exception if it decides that the request cannot be retried.

See Also