{
  "synLogic": "int $ret \u003d $api($1, $2, $3);",
  "help": "The ns_web_add_auto_header API is used to add a HTTP header in all subsequent requests.",
  "notes": "Web scripts automatically send standard headers with each HTTP request they submit. You can add additional headers using the ns_web_add_auto_header API. This instructs Netstorm to generate the specified header for all HTTP requests that follow. This is in contrast to the ns_web_add_header API that applies only to the HTTP request that follows it.\n\nThere are three modes/flags for the same.\r\n0 - To send only in Main URLs\r\n1 - To send only in embedded URLs\r\n2 - To send in both Main and Embedded.",
  "returns": "Returns a status of either 0 for success or 1 for failure",
  "arguments": "\u003ctable class\u003d\"newGuiTable\" style\u003d\"width:100%\" \u003e \u003ctr\u003e \u003cth\u003e Argument \u003c/th\u003e \u003cth\u003e Description \u003c/th\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e Header Name \u003c/td\u003e \u003ctd\u003e Name of the HTTP header \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e Content \u003c/td\u003e \u003ctd\u003e Value of the HTTP header \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e Flag \u003c/td\u003e \u003ctd\u003e The mode in which the header will be sent. It should be provided as a number. There are three possible values: \n0 - To send only in Main URLs\n1 - To send only in embedded URLs\n2 - To send in both Main and Embedded.\n \u003c/td\u003e \u003c/tr\u003e \u003c/table\u003e",
  "parameterization": "",
   "component": [
    {
      "id": "$1",
      "type": "TextField",
      "label": "Header Name",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Header Name",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      }
    },
      {
      "id": "$2",
      "type": "TextField",
      "label": "Content",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Content",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      }
    },
     {
      "id": "$3",
      "type": "Dropdown",
      "label": "Flag",
      "value": 0,
      "css": "p-grid p-align-center w-100-p",
      "title": "Select Flag",
      "placeHolder": "select Flag",
      "style": "",
      "isDisabled": "",
      "list": [
        {
          "label": "MAIN",
          "value": 0
        },
        {
          "label": "EMBEDED",
          "value": 1
        },
        {
          "label": "BOTH",
          "value": 2
        }
      ],
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      }
    },
	{
      "id": "$ret",
      "type": "TextField",
      "label": "Return Variable",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter Return Variable",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": false,
        "min": 0,
        "max": 0,
        "method": "isValidVar(arg)"
      }
    }
   ],
  "name": "ns_web_add_auto_header",
  "syntax": "int ns_web_add_auto_header(char *header, char *content, int flag)",
  "javaSyntax": "int ns_web_add_auto_header(String header,String content, int flag)",
  "jsSyntax": "ns_web_add_auto_header(header: string, content: string, flag: number)",
  "cEx": "flow()\n{\n  //To enable compression and decompression for browsers, set the Accept–Encoding option to gzip:\n  ns_web_add_auto_header(\"\"Accept–Encoding\"\", \"\"gzip\"\", 0);\n}",
  "javaEx": "public class flow implements NsFlow\n{\n  public int execute(NSApi nsApi) throws Exception\n  {\n    //To enable compression and decompression for browsers, set the Accept–Encoding option to gzip:\n    nsApi.ns_web_add_auto_header(\"\"Accept–Encoding\"\", \"\"gzip\"\", 0);\n  }\n}",
  "jsEx": "  //To enable compression and decompression for browsers, set the Accept–Encoding option to gzip:\n  nsApi.ns_web_add_auto_header(\"\"Accept–Encoding\"\", \"\"gzip\"\", 0);\n",
  "insertStrC": "ns_web_add_auto_header(char *header, char *content, int flag);",
  "insertStrJava": "ns_web_add_auto_header(String header, String content, int flag);",
  "insertStrJs": "ns_web_add_auto_header(header: string, content: string, flag: number);",
  "description": "The ns_web_add_auto_header API is used to add a HTTP header in all subsequent requests."
}
