HTTP

Functions

#

request(request_object) → {Response}

initiate AJAX request

Note: Supports a maximum of 15 requests per page.

Parameters:
Name Type Attributes Default Description
request_object object

request object

url string

request url

method 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' <optional>
GET

request method

content string <optional>

request body

headers object <optional>

request content

parameters object <optional>

request parameters

Response object

Response
Examples

Sample GET requestCopycopied

ZDK.HTTP.request({
 url: 'https://zylker.com',
 method: 'GET',
 parameters: {
   query1: 'txt',
 }
});

Sample POST requestCopycopied

ZDK.HTTP.request({
 url: 'https://zylker.com',
 method: 'POST',
 content: {
   name: 'Henry',
 },
 headers: {
   'Content-Type': 'application/json'
 }
});