Well, it has been a while that i did not update anything on my blog. It’s time.
On my task, an async post request need to be sent. So i found ning’s asyncHttpClient. It’s so great and also support websocket. That could improve my project even better.
Today’s chanllenge: send a async post request via ning’s AsyncHttpClient
I can’t find any example about the post request. All examples on their demo are about get request. That block me for around 1 hour.
At beginning, i have no idea where to put the parameters on the request. Some article said that parameters could in body of post request as the follows:
That is not working. Because the server need the request content type should be form-data or x-www-form-urlencoded. Finally, i put the content type and keypair data in head of request. That works: