 | RestClientReadResponseBodyTResult Method |
Namespace: SanteDB.Core.HttpAssembly: SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.2081-alpha+b4ae72647f2cc271f89142f76fff26ad69e00f5a
Syntaxprotected virtual Object ReadResponseBody<TResult>(
HttpWebResponse response
)
Protected Overridable Function ReadResponseBody(Of TResult) (
response As HttpWebResponse
) As Object
protected:
generic<typename TResult>
virtual Object^ ReadResponseBody(
HttpWebResponse^ response
)
abstract ReadResponseBody :
response : HttpWebResponse -> Object
override ReadResponseBody :
response : HttpWebResponse -> Object Parameters
- response HttpWebResponse
- The web response to read the body from.
Type Parameters
- TResult
- The desired type of the result.
Return Value
ObjectAn object that is derived from the response of the request. If
TResult is
byte, The response will be a byte-array. If
TResult is
Stream, then the response will be a stream. Otherwise, the type is determined by the
IContentTypeMapper as part of the configuration.
RemarksSpecial handling is provided for some types.
If TResult is byte, then the body will be read through a buffer into a byte array and returned, regardless of the IContentTypeMapper configured for the client.
If TResult is Stream, then the body will be read into a MemoryStream which will be returned. Callers are responsible for disposing this stream.
See Also