headers, list, names, api, request, response, send, soap, rest, get, post, put, delete

Method GetHeaderNames

API

Returns Header Names

Watch this video to learn how to use this method

Have a problem with playback?
GetHeaderNames method returns names of all of the API response headers. Prior to use this function you need to insert Execute method. The output of GetHeaderNames is array of header's names presented in the received response. We will use messagebox to demonstrate the output. Here you can see all presented headers separated by the comma.

Usage

Function GetHeaderNames(
  Boolean Report [Optional]
)

Method

ZAP Object step

GetHeaderNames

True

headers

Report

Output Parameter

Parameters

Report (optional)

Type: Boolean

Default Value: False

Generate report for this step

Returns

Array

Example

VBScript

Server("API Server").Method("Method").Execute
' Execute method should be called before get header names
headers = Server("API Server").Method("Method").GetHeaderNames(True)

JavaScript

Server("API Server").Method("Method").Execute();
// Execute method should be called before get header names
var headers = Server("API Server").Method("Method").GetHeaderNames(true);

Method

ZAP Object step

Execute

True

Script-Less next step

Comment

Execute method should be called before get header names

Script-Less next step

Method

ZAP Object step

GetHeaderNames

True

time

Contact Us

1425 Market Blvd Suite 530-230

Roswell, GA 30076, USA

(800) 795-3552