Erlang Mailing Lists

Author Message

<  Erlyweb mailing list  ~  Ampersands on erlyweb URL

Guest
Posted: Mon May 12, 2008 11:17 am Reply with quote
Guest
Hi

The standard approach for erlyweb is to use / to separate URL
parameters like so:

http://server:port/app/controller/function/param1/param2/param3/paramN

. What if you want to have a URL of the form?:

http://server:port/app/controller/function?p1=param1&p2=param2&p3=param3&pN=paramN

How can you make an erlyweb application accept URLs of that form and
how would you access the URL parameters from that URL in the erlyweb
controller function?

Nii amon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post received from mailinglist
dmitriid
Posted: Mon May 12, 2008 12:25 pm Reply with quote
User Joined: 17 Aug 2006 Posts: 213
On May 12, 2008, at 2:15 PM, nii amon wrote:

>
> Hi
>
> The standard approach for erlyweb is to use / to separate URL
> parameters like so:
>
> http://server:port/app/controller/function/param1/param2/param3/paramN
>
> . What if you want to have a URL of the form?:
>
> http://server:port/app/controller/function?
> p1=param1&p2=param2&p3=param3&pN=paramN
>
> How can you make an erlyweb application accept URLs of that form and
> how would you access the URL parameters from that URL in the erlyweb
> controller function?

These are available through yaws_api:queryvar(A, var_name), http://yaws.hyber.org/yman.yaws?page=yaws_api


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "erlyweb" group.
To post to this group, send email to erlyweb@googlegroups.com
To unsubscribe from this group, send email to erlyweb-unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/erlyweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Post received from mailinglist
View user's profile Send private message
Guest
Posted: Mon May 12, 2008 3:15 pm Reply with quote
Guest
Right. That worked. Exploring yaws_api.

Thanks Dmitrii.

On May 12, 12:24

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum