Fix async httpclient post to work without multipart

This commit is contained in:
def 2015-07-10 00:32:39 +02:00
commit e264fa24cd

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)