Class TypeContent<TRequestBody>
TypeContent is following the implementation of
Inheritance
Namespace: Geko.HttpClientService.Infrastructure
Assembly: Geko.HttpClientService.dll
Syntax
public class TypeContent<TRequestBody> : ByteArrayContent
Type Parameters
Name | Description |
---|---|
TRequestBody |
Constructors
| Improve this Doc View SourceTypeContent(TRequestBody)
Creates a new instance of the TypeContent<TRequestBody> class. Default encoding is "UTF8" and media type "application/json".
Declaration
public TypeContent(TRequestBody model)
Parameters
Type | Name | Description |
---|---|---|
TRequestBody | model | The object of type |
TypeContent(TRequestBody, Encoding)
Creates a new instance of the TypeContent<TRequestBody> class. Default media type "application/json".
Declaration
public TypeContent(TRequestBody model, Encoding encoding)
Parameters
Type | Name | Description |
---|---|---|
TRequestBody | model | The object of type |
System.Text.Encoding | encoding | The encoding to use for the json that will be added as content. |
TypeContent(TRequestBody, Encoding, String)
Creates a new instance of the TypeContent<TRequestBody> class.
Declaration
public TypeContent(TRequestBody model, Encoding encoding, string mediaType = "")
Parameters
Type | Name | Description |
---|---|---|
TRequestBody | model | The object of type |
System.Text.Encoding | encoding | The encoding to use for the json that will be added as content. |
System.String | mediaType | The media type to use for the json that will be added as content. |