tags:

views:

55

answers:

2

I am currently using Inets with the following request:

   http:request(put, {Url, [{"User-Agent", UA}, {"Content-type", "application/json"}]}, Bodytext, []),

But the request fails.

Any suggestions?

A: 

Try this: http:request(put, {Url, [{"User-Agent", UA}], "application/json", Bodytext}, [], [])

klm
it is a bit of an improvement. the request does not fail but just hangs...
Ted Karmel
Can you use wireshark or tcpdump to determine if the request is reaching your server? Also, can you successfully perform the request with curl?
klm
Yes for the curl question. I will give tcpdump a try. That's a good idea...
Ted Karmel
+1  A: 

ibrowse:start().

ibrowse:send_req(Url, Headers, put, Body).

OR

ibrowse:send_req(Url, Headers, put, Body, Options).

Chandru