rack-devel archive mirror (unofficial) https://groups.google.com/group/rack-devel
 help / color / mirror / code / Atom feed
* How to change the body of a POST?
@ 2009-09-16 20:50 Gustavo Luiz Duarte
  2009-09-21  7:46 ` Hongli Lai
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo Luiz Duarte @ 2009-09-16 20:50 UTC (permalink / raw)
  To: rack-devel


Hi,

I want to write a rack middleware to intercept an HTTP POST request,
change its body, and pass it to rails.
The body is XML (REST) and I intend to change it using XSLT.
I couldn't find a way to do it.
I tried to change env['rack.input'], but no success as it has no
impact in the controller's params (the way I access the xml structure
inside the controller).
Is it possible to do it with Rack? Should it be? How?

[]'s
Gustavo

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: How to change the body of a POST?
  2009-09-16 20:50 How to change the body of a POST? Gustavo Luiz Duarte
@ 2009-09-21  7:46 ` Hongli Lai
  0 siblings, 0 replies; 2+ messages in thread
From: Hongli Lai @ 2009-09-21  7:46 UTC (permalink / raw)
  To: Rack Development


On Sep 16, 10:50 pm, Gustavo Luiz Duarte <gustav...@gmail.com> wrote:
> Hi,
>
> I want to write a rack middleware to intercept an HTTP POST request,
> change its body, and pass it to rails.
> The body is XML (REST) and I intend to change it using XSLT.
> I couldn't find a way to do it.
> I tried to change env['rack.input'], but no success as it has no
> impact in the controller's params (the way I access the xml structure
> inside the controller).
> Is it possible to do it with Rack? Should it be? How?

It should be possible if you substitute env['rack.input'] with your
own before the web framework has accessed it.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-21  7:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-16 20:50 How to change the body of a POST? Gustavo Luiz Duarte
2009-09-21  7:46 ` Hongli Lai

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/rack.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).