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