RequestData

How to get RequestData

ES2015+:

import RequestData from 'fontoxml-connector/RequestData'

ES5:

define([
	'fontoxml-connector/RequestData'
], function (
	RequestData
) {
});

Type: Class

Represents data contained in a request to the CMS, to be used in the CmsClient#sendRequest and CmsClient#sendRequestToUrl methods of standardCmsClient.

Make sure to create a new instance for every request.

Methods

Name Description
addHeader

Add a single HTTP header to the request.


  Arguments
# Name Type Description
1. name String
2. value String
  Returns

Type: RequestData

for chaining

addHeaders

Add HTTP headers to the request by providing a key-value mapping.


  Arguments
# Name Type Description
1. headerValueByName Object

Key value pair of request headers.

  Returns

Type: RequestData

for chaining

addMultipart

Add multipart-encoded binary data to the HTTP POST body of the request.


  Arguments
# Name Type Description
1. name String
2. value String | Blob | File
3. [filename] String
  Returns

Type: RequestData

for chaining

addPostBody

Add HTTP POST data to the body of the request.


  Arguments
# Name Type Description
1. body String | Object
  Returns

Type: RequestData

for chaining

addPostParameter

Add HTTP POST data to the body of the request.


  Arguments
# Name Type Description
1. name String
2. value String
  Returns

Type: RequestData

for chaining

addPostParameters

Add HTTP POST data to the body of the request.


  Arguments
# Name Type Description
1. valueByName Object

Key value pair of post parameters

  Returns

Type: RequestData

for chaining

addQueryParameter

Add a single query parameter to the request.


  Arguments
# Name Type Description
1. name String
2. value String
  Returns

Type: RequestData

for chaining

addQueryParameters

Add query parameters to the request by providing a key-value mapping.


  Arguments
# Name Type Description
1. valueByName Object

Key value pair of query parameters.

  Returns

Type: RequestData

for chaining

setContentType

Set the HTTP Content-Type header value for the request.


  Arguments
# Name Type Description
1. contentType String
  Returns

Type: RequestData

for chaining