Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Guides   Examples
New in version: 9.0   9.1   9.2   9.3   9.4   9.5   10.0   10.1   10.2   10.3    Statistic  

CURL.GetHeaderAsJSON

Returns headers parsed as JSON.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
CURL 10.2 Yes Yes Yes Yes Yes
MBS( "CURL.GetHeaderAsJSON"; curl )   More

Parameters

Parameter Description Example value
curl The CURL session handle. $curl

Result

Returns JSON or error.

Description

Returns headers parsed as JSON.
This is for HTTP headers or headers in similar format.
We add to the JSON some special entries for the HTTP result line: HTTP-Version, HTTP-ResponseCode, and HTTP-ResponseMessage.

Examples

Query headers as JSON:

MBS( "CURL.GetHeaderAsJSON"; $curl )

Example result:
{
  "HTTP-Version":   "1.1",
  "HTTP-ResponseCode":   "200",
  "HTTP-ResponseMessage":   "OK",
  "Date":   "Sat, 25 Apr 2020 10:37:35 GMT",
  "Server":   "Apache/2.4.41",
  "Upgrade":   "h2c",
  "Connection":   "Upgrade",
  "Last-Modified":   "Thu, 28 Feb 2013 16:43:55 GMT",
  "ETag":   "\"726-4d6cb98aca8c0\"",
  "Accept-Ranges":   "bytes",
  "Content-Length":   "1830",
  "Content-Type":   "text/plain",
  "Content-Language":   "en"
}

See also

Blog Entries

Release notes

Created 25th April 2020, last changed 25th April 2020


CURL.GetHTTPVersion   -   CURL.GetHeaderAsText

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins