Request Actions

Jaseci allows for in-code use of common request methods.

Get Request

# make get request 
# url : string  - url to where the request will be made 
# data : dictionary - data being sent that will be converetd to json.
# header : dicionary -  header data 
response = request.get(url ,data , headers)

Post Request

# make post request 
# url : string  - url to where the request will be made 
# data : dictionary - data being sent that will be converetd to json.
# header : dicionary -  header data 
response = request.post(url ,data , headers)

Put Request

# make put request 
# url : string  - url to where the request will be made 
# data : dictionary - data being sent that will be converetd to json.
# header : dicionary -  header data 
response = request.put(url ,data , headers)

Delete Request

# make delete request 
# url : string  - url to where the request will be made 
# data : dictionary - data being sent that will be converetd to json.
# header : dicionary -  header data 
response = request.delete(url ,data , headers)

Head Request

# make head request , returns header of  a get request alone
# url : string  - url to where the request will be made 
# data : dictionary - data being sent that will be converetd to json.
# header : dicionary -  header data 
response = request.head(url ,data , headers)

Option Request

# make options request , requests permitted communications options fror a given url or server.
# url : string  - url to where the request will be made 
# data : dictionary - data being sent that will be converetd to json.
# header : dicionary -  header data 
response = request.get(url ,data , headers)

File upload

# used to upload a file or files
# url : string  - url to where the request will be made 
# file : single base64 encoded file
# files : list of base64 encode files.
# header : dicionary -  header data 
response = request.multipart_base64(url ,file , headers)

Download File

# url : string  - url to where the request will be made 
# header : dicionary -  header data 
# encoding : strign - file format , default is utf-8
downloaded_file = request.file_download_base64(url,header,encoding)