Virtual Serial Port Tools - Advanced serial port configurations for your custom ports usage scenario
Download Virtual Serial Port Tools Hide this button

IHttpRequestOptions Interface

An object with this interface is usually created by a device script and passed to IHttpClient.request method to customize its behavior.

Declaration

interface IHttpRequestOptions {
    // Properties
    ${headers}?: string[] | ${IHttpHeader}[];
    ${body}?: string | number[] | Uint8Array;
    ${encoding}?: ${UnicodeEncoding};
    ${mediaType}?: string;
}
// This interface is not available in managed environment
// This interface is not available in native environment

IHttpRequestOptions Properties

headers

headers?: string[] | ${IHttpHeader}[];
// This property is not available in managed environment
// This property is not available in native environment

HTTP headers, either as a string array or array of IHttpHeader objects. If string array is used, each string must be of the form Name: Value.

body

body?: string | number[] | Uint8Array;
// This property is not available in managed environment
// This property is not available in native environment

HTTP request body, can be a string, array or a byte array

encoding

encoding?: ${UnicodeEncoding};
// This property is not available in managed environment
// This property is not available in native environment

Encoding for string body. Used only if body is a string. Defaults to UTF8.

mediaType

mediaType?: string;
// This property is not available in managed environment
// This property is not available in native environment

Body media type. Defaults to text/plain. Used only if body is a string. Defaults to UTF8.