http://www.myserver.com/exile?Key1=Value1&Key2=Value2
When i get a request in this format to my server, how do i handle this request? What i need to do: Need to get all the values and run a Erlang module, and send the result to the client.Is exile a CGI and if so how come it doesn't have a .cgi extension?
Additional Data: I have setup an Yaws on my server(Desktop running linux server). yaws.conf file is configured.
Here are the solutions:
More information here: http://yaws.hyber.org/query.yaws
OR
OR
Read more on Module: yaws_api.erl
*NOTE * avoid using the last option (
getvar/2
) because it first checks the POST data and then also checks the GET data, looking for your specified parameter. It should only be used when you are not sure wether the parameter is coming along the GET or POST request data.