|  Developer
Updated on March 28, 2023

sendHttpRequest

  • Send HTTP request
Edit
Field Type Required Description
blockOptions.method.args.url + Target url. It can contain port.
blockOptions.method.args.credential credential User and password for HTTP authorization.
blockOptions.method.args.request string Type of request. Possible value: GET, POST, PUT, DELETE. Default value: GET.
blockOptions.method.args.contentType string Type of sending content
blockOptions.method.args.content string Sending content
blockOptions.method.args.headers dictionary Set of custom HTTP headers
blockOptions.method.args.skipSecurity bool Skip any security checks: check date, domain, and self-signed certificates criteria. Default value: false.
saveResult object Save result to a global variable
saveResult.method string + Save result method name
saveResult.args.name string + Name of a global variable to stored value to.
Edit
				
					{
   "blockOptions":{
      "method":{
         "name":"sendHttpRequest",
         "args":{
            "url":"url",
            "credential":"credential",
            "request":"request",
            "contentType":"contentType",
            "content":"content",
            "headers":"headers",
            "skipSecurity":"skipSecurity"
         }
      }
   },
   "blockType":"then",
   "fields":[
      {
         "name":"url",
         "type":"string",
         "value": "https://ezlo.com/"
      },
      {
         "name":"credential",
         "type":"credential",
         "value": {
             "user":"admin",
             "password":"admin"
         }
      },
      {
         "name":"request",
         "type":"string",
         "value": "POST"
      },
      {
         "name":"contentType",
         "type":"string",
         "value": "text/plain"
      },
      {
         "name":"content",
         "type":"string",
         "value": "Request check"
      },
      {
         "name":"headers",
         "type":"dictionary",
         "value": {
              "token":"SecurityToken13"
         }
      },
      {
         "name":"skipSecurity",
         "type":"bool",
         "value": false
      }
   ],
   "saveResult": {
        "method": "setVariable",
        "args": {
            "name": "<existingVariableName>",
            "valueType": "string"
        }
   }
}				
			
Note: Ability to save result of an HTTP request action in a global variable, using optional block is available since advanced_scenes/1.43.