HTTP Reference
Http transfer
Script
Function
bool gkScript::fetchUrl(string url, string &response, map<string string>header = [])
Fetches a URL into a string
Samples:
HttpResponse Object
Script
Function
HttpResponse gkScript::httpRequest(string url, method httpMethod, map<string string>header = [], string requestBody = "")
Creates a HttpResponse class
The following methods are defined:
HttpResponse class
Http transfer sample
The following sample is a combination of the script from Http transfer and HttpResponse Object. It uses both to get the headers of an URL. Then a GET method with range header to retrieve the first 100 bytes of the URL.
Last updated