| WikiResponseMessageParserTIWikiResponseMessageParserTParseResponseAsync 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> IWikiResponseMessageParser<T>.ParseResponseAsync(
HttpResponseMessage response,
WikiResponseParsingContext context
)
Private Function ParseResponseAsync (
response As HttpResponseMessage,
context As WikiResponseParsingContext
) As Task(Of Object) Implements IWikiResponseMessageParser(Of T).ParseResponseAsync
Dim instance As WikiResponseMessageParser
Dim response As HttpResponseMessage
Dim context As WikiResponseParsingContext
Dim returnValue As Task(Of Object)
returnValue = CType(instance, IWikiResponseMessageParser(Of T)).ParseResponseAsync(response,
context)
private:
virtual Task<Object^>^ ParseResponseAsync(
HttpResponseMessage^ response,
WikiResponseParsingContext^ context
) sealed = IWikiResponseMessageParser<T>::ParseResponseAsync
private abstract ParseResponseAsync :
response : HttpResponseMessage *
context : WikiResponseParsingContext -> Task<Object>
private override 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.
Implements
IWikiResponseMessageParserTParseResponseAsync(HttpResponseMessage, WikiResponseParsingContext)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