Merge pull request #3095 from def-/fix-async-post

Fix async httpclient post to work without multipart
This commit is contained in:
Dominik Picheta 2015-07-11 14:06:30 +01:00
commit 994d81461b

View file

@ -834,6 +834,7 @@ proc post*(client: AsyncHttpClient, url: string, body = "", multipart: Multipart
else: else:
x x
var xb = mpBody.withNewLine() & body var xb = mpBody.withNewLine() & body
if multipart != nil:
client.headers["Content-Type"] = mpHeader.split(": ")[1] client.headers["Content-Type"] = mpHeader.split(": ")[1]
client.headers["Content-Length"] = $len(xb) client.headers["Content-Length"] = $len(xb)