set, request, raw, body, type, api, request, response, send, soap, rest, get, post, put, delete

Method SetRequestRawBody

API

Sets Raw Request Body Data and enables raw request property

Watch this video to learn how to use this method

Have a problem with playback?
SetRequestRawBody sets request raw body data to API method during runtime The input parameters are string bodyData and optional boolean useRawBody defining whether use new RawBody data in request or not, by default it's True Let's change ConcatArrayData API method request raw body - we will set value "test". Then we out RawBody data with GetRequestRawBody to see if the value changes. We will use message box for the output. Run the script and we can see the request RawBody changes according to our command.

Usage

Function SetRequestRawBody(
    String BodyData,
    Boolean UseRawBody [Optional]
)

CreateBook

SetReq...Body

{...}

True

BodyData

UseRawBody

Parameters

BodyData

Type: String

Request body data

UseRawBody (optional)

Type: Boolean

Default Value: True

If true uses Raw Body Data in a request

Returns

No return value

Example

VBScript

Server("API Server").Method("CreateBook").SetRequestRawBody "{""Author"": ""Unknown"", ...}", True

JavaScript

Server("API Server").Method("CreateBook").SetRequestRawBody("{""Author"": ""Unknown"", ...}", true);

CreateBook

SetReq...Body

{...}

True

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227