 | RestClientWriteRequestBodyAsyncTBody Method |
Namespace: SanteDB.Core.HttpAssembly: SanteDB.Core.Api (in SanteDB.Core.Api.dll) Version: 3.0.2081-alpha+b4ae72647f2cc271f89142f76fff26ad69e00f5a
Syntaxprotected virtual Task WriteRequestBodyAsync<TBody>(
string contentType,
TBody body,
HttpWebRequest webrequest
)
Protected Overridable Function WriteRequestBodyAsync(Of TBody) (
contentType As String,
body As TBody,
webrequest As HttpWebRequest
) As Task
protected:
generic<typename TBody>
virtual Task^ WriteRequestBodyAsync(
String^ contentType,
TBody body,
HttpWebRequest^ webrequest
)
abstract WriteRequestBodyAsync :
contentType : string *
body : 'TBody *
webrequest : HttpWebRequest -> Task
override WriteRequestBodyAsync :
contentType : string *
body : 'TBody *
webrequest : HttpWebRequest -> Task Parameters
- contentType String
- The content type header that will be the type of content to send in the request.
- body TBody
- The object representing the body of the request.
- webrequest HttpWebRequest
- The request object to write the body to.
Type Parameters
- TBody
- The type of body that is provided.
Return Value
TaskA task that can be awaited while the operation completes.
Exceptions
RemarksSpecial handling is provided for some types of TBody:
If TBody is byte, the body will be copied directly from the array to the request stream.
If TBody is Stream, the body will be copied directly from the stream to the request stream.
See Also