I have a form:
<form>
<input id = "sendLink" type = "text" placeholder = "insert a link here">
</form>
Then i trying to send data (it's a url (string) like http://sameURL.com) :
xmlhttp.open('POST', 'http://host:8453/page.htm', true);
xmlhttp.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
xmlhttp.send($link);
But on server side i receive a 'splitted' post body:
"headers": {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
...
more headers here
...
"User-Agent": "Mozilla/5.0"
},
"httpVersion": "1.1",
"method": "POST",
"post": {
"http://sameURL.com": ""
},
"postRaw": "http://sameURL.com",
"url": "/page.htm"
}
Why i got
"http://sameURL.com": ""
in post body instead of
? Thank you. I need request without additional colon and "". I should work only with "http://sameURL.com" string.
UPD 1
Testing purpose: $link = "https://google.com?q1=asdf?q2=ddd?q3=ppp";
In that case we got:
"post": {
"https://google.com?q1": "asdf?q2=ddd?q3=ppp"
},
"postRaw": "https://google.com?q1=asdf?q2=ddd?q3=ppp",