Skip to main content

Set-Headers

Command Description

Set the headers to use when sending HTTP requests

Command Prototype

HTTP.SetHeaders(dictHeaders)

Parameter Description

ParameterRequiredTypeDefaultDescription
dictHeadersTrueexpression{}A JSON object consisting of one or more request header names paired with request header values

Demo

TracePrint("--------------------------Set Headers------------------- --------") 
//-------------------------------------------------------------------------------
//[Remarks] Set the headers used when the HTTP protocol submits data.
//Input parameter 1:
// dictHeaders--Headers. NOTE: The name of the credential, used to distinguish each credential
//out parameters:
// None
//Command prototype: HTTP.SetHeaders(dictHeaders)
HTTP.SetHeaders({"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36"})