tags:

views:

129

answers:

1

The following post indicates how to make a simple get http request with Erlang's inets.

exploring erlang's http client

Sometimes, URLs have GET parameters:

http://example.net/item?parameter1=12&parameter2=1431&parameter3=8765

Besides including the parameters in the URL itself, is there a way to create variables and then send them with the request?

Example appreciated.

+1  A: 

I have a really quick'n'dirty solution in the etorrent code base:

http://github.com/jlouis/etorrent/blob/master/src/etorrent_tracker_communication.erl#L232

which constructs what you are asking for a bittorrent client. Now, for more heavy work you might want to wrap that up into a library on its own. There are other HTTP client libraries for Erlang you can use as well, see for instance

jlouis