get, request, body, item, api, request, response, send, soap, rest, get, post, put, delete

Method GetRequestBodyItem

API

Gets Request Body Item value

Watch this video to learn how to use this method

Have a problem with playback?
GetRequestBodyItem returns request body item value The input parameter is string Name and optional Position if request contains more then one body item with similar name. It is starting from 0 and 0 by default The output is string Value Let's see ConcatArrayData Request Body contains 2 items with the same name Let's output 2nd one via messagebox So the name should be "array.a:string" and the number shoild be "1" We can see output is "b" as expected.

Usage

Function GetRequestBodyItem(
    String Name,
    Integer Position [Optional]
)

CreateBook

GetReq...dyItem

Title

0

Name

Position [Optional]

Parameters

Name

Type: String

The name of the Body Item

Position (optional)

Type: Integer

Default Value: 0

Position if request contains few item names

Returns

Request Body Item value or Empty string

Example

VBScript

msgbox Server("API Server").Method("CreateBook").GetRequestBodyItem("Title")
' set position
msgbox Server("API Server").Method("CreateBook").GetRequestBodyItem("Title", 0)

JavaScript

alert(Server("API Server").Method("CreateBook").GetRequestBodyItem("Title"));
// set position
alert(Server("API Server").Method("CreateBook").GetRequestBodyItem("Title", 0));

Variable

title

GetReq...dyItem

Title

Method

Zap.Comm...Box

Zap.Var...("title")

Contact Us

Tower Place 100

3340 Peachtree Rd NE #1800 

Atlanta, GA 30326 USA

(404) 814-5227