Class ContentHelper
A utility class to handle HTTP request content creation.
Inherited Members
Namespace: Oci.Common.Http.Internal
Assembly: OCI.DotNetSDK.Common.dll
Syntax
public class ContentHelper
Fields
logger
Declaration
protected static Logger logger
Field Value
| Type | Description |
|---|---|
| Logger |
Methods
CreateHttpContent(object)
Creates HttpContent.
Declaration
public static HttpContent CreateHttpContent(object content)
Parameters
| Type | Name | Description |
|---|---|---|
| object | content | The content to create HttpContent from. |
Returns
| Type | Description |
|---|---|
| HttpContent | The HttpContent created. |
SerializeJsonIntoStream(object, Stream)
Converts a json string to stream.
Declaration
public static void SerializeJsonIntoStream(object value, Stream stream)
Parameters
| Type | Name | Description |
|---|---|---|
| object | value | The json string value. |
| Stream | stream | The stream that will contain the converted value. |
UpdateSettableHttpContentHeaders(HttpContent, Dictionary<string, string>)
Updates the Settable HttpContent Header with values provided in Request.
Declaration
public static void UpdateSettableHttpContentHeaders(HttpContent httpContent, Dictionary<string, string> contentHeaders)
Parameters
| Type | Name | Description |
|---|---|---|
| HttpContent | httpContent | The httpContent to be updated. |
| Dictionary<string, string> | contentHeaders |