I’m currently making an HTTP request using DroidScript, and I’m encountering some problems.
var headers = "Cookie=name=value"
http = app.HttpRequest("GET", http://localhost/, null, null, callback,headers);
http.send(null);
The PHP Server index.php
<?php
foreach(getallheaders() as $header => $val){
echo "<h5>$header => $val<h5/>";
}
?>
The HTTP response.
Accept-Charset => UTF-8
Cookie => name
Connection => Keep-Alive
Accept-Encoding => gzip
I tried using the escape character.
var headers = "Cookie=name%3Dvalue";
var headers = "Cookie=namex3Dvalue";
The result is the same.
The cookie name is all I can get, not the value.
New contributor
Zyren is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.