Webmachine questions

u a <>
Thu Mar 24 09:15:33 CET 2011


Hello,

i am working on a small project, where i am using webmachine.
Everything works fine, but know i have some question regarding the
tool.

1. Tunneld delete throw POST (HTML forms)

Because of the limitation of the browser, i have to tunnel a delete
request throw a post request to webmachine.
When i look in the trace, great tool :-) , my request comes to the
decision M16 where the question is asked if this is a DELETE method or
not.
The answer is false , because it is a POST and not a DELETE method.

Is it possible to change the method from a POST to a DELETE or which
kind of solution is the best?

2. Getting the protocol for the location

When i create a location header or a redirect, i want to decide of the
underlying socket, which kind of protocol i have to use (HTTP or HTTPS
for instance. I found that the socket is part of webmachine_request,
but there is no function inside wrq to retrieve this information.

Is there an easy way to detect the protocol which is used inside the
resource?

Thanks for your help,
Ulf


More information about the erlang-questions mailing list