RestClientRequestParams interface
Parameters for sending a WebApi request
Properties
api |
The api version string to send in the request (e.g. "1.0" or "2.0-preview.2") |
body | Data to post. In this case of a GET, this indicates query parameters. For other requests, this is the request body object (which will be serialized into a JSON string unless isRawData is set to true). |
command | Current command for activity logging. This will override the RestClient's base option. |
custom |
Allows the caller to specify custom request headers. |
http |
The http response (Accept) type. This is "json" (corresponds to application/json Accept header) unless otherwise specified. Other possible values are "html", "text", "zip", or "binary" or their accept header equivalents (e.g. application/zip). |
is |
If true, this indicates that no processing should be done on the 'data' object before it is sent in the request. This is rarely needed. One case is when posting an HTML5 File object. |
method | HTTP verb (GET by default if not specified) |
query |
Query parameters to add to the url. In the case of a GET, query parameters can be supplied via 'data' or 'queryParams'. For other verbs such as POST, the data object specifies the POST body, so queryParams is needed to indicate parameters to add to the query string of the url (not included in the post body). |
return |
If true, indicates that the raw Response should be returned in the request's resulting promise rather than deserializing the response (the default). |
route |
Route template that is used to form the request path. If routeTemplate is NOT specified, then locationId is used to lookup the template via an OPTIONS request. |
route |
Dictionary of route template replacement values |
Property Details
apiVersion
The api version string to send in the request (e.g. "1.0" or "2.0-preview.2")
apiVersion: string
Property Value
string
body
Data to post. In this case of a GET, this indicates query parameters. For other requests, this is the request body object (which will be serialized into a JSON string unless isRawData is set to true).
body?: any
Property Value
any
command
Current command for activity logging. This will override the RestClient's base option.
command?: string
Property Value
string
customHeaders
Allows the caller to specify custom request headers.
customHeaders?: {[headerName: string]: any}
Property Value
{[headerName: string]: any}
httpResponseType
The http response (Accept) type. This is "json" (corresponds to application/json Accept header) unless otherwise specified. Other possible values are "html", "text", "zip", or "binary" or their accept header equivalents (e.g. application/zip).
httpResponseType?: string
Property Value
string
isRawData
If true, this indicates that no processing should be done on the 'data' object before it is sent in the request. This is rarely needed. One case is when posting an HTML5 File object.
isRawData?: boolean
Property Value
boolean
method
HTTP verb (GET by default if not specified)
method?: string
Property Value
string
queryParams
Query parameters to add to the url. In the case of a GET, query parameters can be supplied via 'data' or 'queryParams'. For other verbs such as POST, the data object specifies the POST body, so queryParams is needed to indicate parameters to add to the query string of the url (not included in the post body).
queryParams?: {[key: string]: any}
Property Value
{[key: string]: any}
returnRawResponse
If true, indicates that the raw Response should be returned in the request's resulting promise rather than deserializing the response (the default).
returnRawResponse?: boolean
Property Value
boolean
routeTemplate
Route template that is used to form the request path. If routeTemplate is NOT specified, then locationId is used to lookup the template via an OPTIONS request.
routeTemplate: string
Property Value
string
routeValues
Dictionary of route template replacement values
routeValues?: {[key: string]: any}
Property Value
{[key: string]: any}