to JSONObject
Convert an HTTP header string into a JSONObject. It can be a request header or a response header. A request header will contain
{
Method: "POST" (for example),
"Request-URI": "/" (for example),
"HTTP-Version": "HTTP/1.1" (for example)
}
Content copied to clipboard
{
"HTTP-Version": "HTTP/1.1" (for example),
"Status-Code": "200" (for example),
"Reason-Phrase": "OK" (for example)
}
Content copied to clipboard
Date: Sun, 26 May 2002 18:06:04 GMT
Cookie: Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s
Cache-Control: no-cache
Content copied to clipboard
Date: "Sun, 26 May 2002 18:06:04 GMT",
Cookie: "Q=q2=PPEAsg--; B=677gi6ouf29bn&b=2&f=s",
"Cache-Control": "no-cache",
...
Content copied to clipboard
Return
A JSONObject containing the elements and attributes of the XML string.
Parameters
string
An HTTP header string.
Throws
if a called function fails