| IWikiResponseMessageParserTParseResponseAsync Method |
This is preliminary documentation and is subject to change.
Parses the specified HTTP response message.
Namespace: WikiClientLibrary.ClientAssembly: WikiClientLibrary (in WikiClientLibrary.dll) Version: 0.9.0-int.2+447d1d590e6726b7881f750a0a0e42908f3e417e
Syntax Task<Object> ParseResponseAsync(
HttpResponseMessage response,
WikiResponseParsingContext context
)
Function ParseResponseAsync (
response As HttpResponseMessage,
context As WikiResponseParsingContext
) As Task(Of Object)
Dim instance As IWikiResponseMessageParser
Dim response As HttpResponseMessage
Dim context As WikiResponseParsingContext
Dim returnValue As Task(Of Object)
returnValue = instance.ParseResponseAsync(response,
context)
Task<Object^>^ ParseResponseAsync(
HttpResponseMessage^ response,
WikiResponseParsingContext^ context
)
abstract ParseResponseAsync :
response : HttpResponseMessage *
context : WikiResponseParsingContext -> Task<Object>
Parameters
- response HttpResponseMessage
- The HTTP response message to parse.
- context WikiResponseParsingContext
- The parsing context.
Return Value
TaskObjectThe task that will return the parsed value. The parsed value should be able to be converted to
T.
Exceptions Exception | Condition |
---|
ArgumentNullException | Either response or context is null. |
Exception | An 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