$httpRequest
Perform an http request, with a content and headers and return the response content
Usage
$httpRequest[URL;Method;Content;Header 1;Header 2;...]
Methods:
Accepts PUT, GET, POST, DELETE, HEAD, PATCH methods, if not provided, it will use GET method
Content Input:
It can any content that suitable for your content-type
header, like with content-type: application/json
you can put the content as json format and so on
Header:
It accept the header in format of header: value
for example: Content-Type: application/json
Example (Sending JSON Request):
Some Notes:
- This function wont throw error if request non-ok status, so please check on your own the return value of $httpRequestStatus after the request to make sure its valid status you expecting
- Make sure the response data length is less than 1 MB, or it will errorRandom