HttpRequestMessage<T> Constructor (T, HttpMethod, Uri, IEnumerable<MediaTypeFormatter>)
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Initializes a new instance of the <see cref="T:System.Net.Http.HttpRequestMessage`1" /> class.
Namespace: System.Net.Http
Assembly: System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)
Syntax
'Declaration
Public Sub New ( _
value As T, _
method As HttpMethod, _
requestUri As Uri, _
formatters As IEnumerable(Of MediaTypeFormatter) _
)
public HttpRequestMessage(
T value,
HttpMethod method,
Uri requestUri,
IEnumerable<MediaTypeFormatter> formatters
)
public:
HttpRequestMessage(
T value,
HttpMethod^ method,
Uri^ requestUri,
IEnumerable<MediaTypeFormatter^>^ formatters
)
new :
value:'T *
method:HttpMethod *
requestUri:Uri *
formatters:IEnumerable<MediaTypeFormatter> -> HttpRequestMessage
public function HttpRequestMessage(
value : T,
method : HttpMethod,
requestUri : Uri,
formatters : IEnumerable<MediaTypeFormatter>
)
Parameters
- value
Type: T
The object to use as the content of this new instance.
- method
Type: System.Net.Http.HttpMethod
The HttpMethod for this request.
- requestUri
Type: System.Uri
The Uri to use for this request.
- formatters
Type: System.Collections.Generic.IEnumerable<MediaTypeFormatter>
The collection of MediaTypeFormatter instances to use for serialization.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.