Method CheckHeaderValue

Checks Header with a Given value

Usage

Function CheckHeaderValue(
    String HeaderName,
    String Value,
    Boolean Report [Optional]
)

Method

ZAP API Method step

CheckH...Value

Server

Apache/2.4.1

True

String HeaderName

String Value

Boolean Report [Optional]

Parameters

HeaderName

Type: String

Header Name

Value

Type: String

Value

Report (optional)

Type: Boolean

Default value: True

Report Result

Returns

True if header value matches value parameter

Example

VBScript

Server("API Server").Method("Method").Execute
' Execute method should be called before check header value
headerValue = Server("API Server").Method("Method").CheckHeaderValue("Server", "Apache/2.4.1")

JavaScript

Server("API Server").Method("Method").Execute();
// Execute method should be called before check header value
var headerValue = Server("API Server").Method("Method").CheckHeaderValue("Server", "Apache/2.4.1");

Method

ZAP API Method step

Execute

Script-Less next step

Comment

Execute method should be called before get header value

Script-Less next step

Method

ZAP API Method step

CheckH...Value

Server

Apache/2.4.1

True