http

Instantiate an HTTP client

http=option.http


 

Method

Purpose

Example

get(url)

Issues an HTTP GET request and returns the output

memory.put(“counter”,0)

post(url,body)

 


put(url,body)

 


patch(url,body)

 


downloadFile(url,id,filename)

 


useAuth(name) 

Uses the credentials with this name from the credential store for all subsequent requests


accept(type)

Sets the accept header


content(type)

Sets the content-type header


addHeader(name,value)

Adds the header to all subsequent requests


response

Retrieves the response from the last request


statuscode

Contains the HTTP status code from the last request


reason

The reason phrase from the last request


exception

The exception thrown by the last request


responseHeaders

All response headers from the last request


contentTypeHeader

The content-type response header from the last request