http

Sends http request. Returns the response as json.

javascript · Common Scripts

Details

IDhttp
Languagejavascript
From Version5.0.0
TagsUtility

README

Sends a HTTP request and returns the response as JSON.

Script Data


Name Description
Script Type javascript
Tags Utility
Cortex XSOAR Version 3.5.0+

Inputs


Argument Name Description
method The method for the http request.
body The body for the http request.
url The URL for the http request.
headers The headers for the http request, in the format of “key1:value1,key2:value2, …”.
insecure Trust any certificate (not secure).
unsecure Trust any certificate (not secure).
proxy Use the system proxy settings.
username The user for the http request.
password The password for the http request.
saveAsFile Whether to save the file. The default is “no”.
filename The filename from headers if the filename is not given. The default is “http-file”.

Outputs


Path Description Type
HttpRequest.Response The response for the http request. Unknown
commonfields:
  id: http
  version: -1
name: http
comment: Sends http request. Returns the response as json.
script: ''
type: javascript
tags:
- Utility
enabled: true
args:
- name: method
  required: true
  auto: PREDEFINED
  predefined:
  - GET
  - POST
  - DELETE
  - PUT
  description: The method for the http request.
- name: body
  description: The body for the http request.
- name: url
  required: true
  description: The url for the http request.
- name: headers
  description: The headers for the http request, in the format of 'key1:value1,key2:value2, ...'
- name: insecure
  auto: PREDEFINED
  description: Trust any certificate (not secure).
  deprecated: true
- name: unsecure
  auto: PREDEFINED
  description: Trust any certificate (not secure).
  predefined:
  - "true"
  - "false"
  defaultValue: "true"
- name: proxy
  auto: PREDEFINED
  description: Use system proxy settings.
  predefined:
  - "true"
  - "false"
  defaultValue: "false"
- name: username
  description: The user for the http request.
- name: password
  secret: true
  description: The password for the http request.
- name: saveAsFile
  description: yes to save file, else no. Default is no.
  defaultValue: "no"
- name: filename
  description: Using filename from headers if filename is not given. Default is http-file.
outputs:
- contextPath: HttpRequest.Response
  description: The response for the http request.
scripttarget: 0
fromversion: 5.0.0
tests:
- No tests (auto formatted)