mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
FS#117 - Fix POST requests not working with sf::Http
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/trunk@1147 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
0ad6295ff4
commit
e4042e8b4f
@ -386,6 +386,10 @@ Http::Response Http::SendRequest(const Http::Request& Req, float Timeout)
|
||||
Out << ToSend.myBody.size();
|
||||
ToSend.SetField("Content-Length", Out.str());
|
||||
}
|
||||
if ((ToSend.myMethod == Request::Post) && !ToSend.HasField("Content-Type"))
|
||||
{
|
||||
ToSend.SetField("Content-Type", "application/x-www-form-urlencoded");
|
||||
}
|
||||
|
||||
// Prepare the response
|
||||
Response Received;
|
||||
|
Loading…
Reference in New Issue
Block a user