{
  "synLogic": "int $ret \u003d $api($1, $2);",
  "help": "The ns_set_ua_string API sets the user agent string  used in load test",
  "notes": "1. It overrides the default user agent \n2. you can use this api when you want to send some specific user agent from your script .",
  "returns": "A value of 0 indicates success, while a non-zero value indicates 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 User Agent String \u003c/td\u003e 	\u003ctd\u003e A pointer to a character array that represents the user agent string to be used in the load test. This argument should be a pointer to a static memory location that stores the user agent string. \u003c/td\u003e   \u003c/tr\u003e \u003ctr\u003e  \u003ctd\u003e User Agent String Length \u003c/td\u003e  \u003ctd\u003e An integer representing the length of the user agent string pointed to by ua_str. This argument is necessary because the user agent string may contain null characters, and therefore its length cannot be determined using standard string functions. If the user agent string does not contain any null characters, the value of ua_string_len should be equal to the length of the string. \u003c/td\u003e \u003c/tr\u003e \u003c/table\u003e",
  "parameterization": "",
  "component": [
    {
      "id": "$1",
      "type": "TextField",
      "label": "User Agent String",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter User Agent String",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      },
      "quotes": true
    },
    {
      "id": "$2",
      "type": "TextField",
      "label": "User Agent String Length",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter User Agent String length",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Number",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 2147483647
      },
      "quotes": true
    },
    {
      "id": "$ret",
      "type": "TextField",
      "label": "Return Variable",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "First character must be Alpha.\r\nOther characters are Alpha, Numeric or Underscore",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,63}$",
        "required": false,
        "min": 0,
        "max": 0,
        "method": "isValidVar(arg)"
      },
      "quotes": true
    }
  ],
  "name": "ns_set_ua_string",
  "syntax": "int ns_set_ua_string (char *ua_str, int ua_str_len)",
  "javaSyntax": "",
  "cEx": "flow()\n{\n  char* ua_static_ptr;\n  ua_static_ptr \u003d \"cavissonloadtest\";\n  ns_set_ua_string(ua_static_ptr);\n}",
  "javaEx": "String ua_static;\r\nua_static \u003d “Mozilla 5.0 ….”\r\nnsApi.ns_set_ua_string(ua_static);\r",
  "insertStrC": "(char *ua_str, int ua_str_len);",
  "insertStrJava": "",
  "description": "The ns_set_ua_string API sets the user agent string  used in load test"
}