On Feb 13, 2009, at 12:11 AM, Freddie Tilley wrote:
On 12 feb 2009, at 19:55, Chuck Hill wrote:
On Feb 12, 2009, at 9:55 AM, Freddie Tilley wrote:

I wish to pass some header variables to a redirect but I'm having some problems

I'm trying to set the header as follows (I found this somewhere)

WORedirect redirect = new WORedirect(this.context());
redirect.setUrl("http://someurl.nl";);
WOResponse r = redirect.generateResponse();
r.setHeader("Value","Key");
redirect.appendToResponse(r, context());

But this does not appear to work. Is there a way to call the
call the destination page with custom headers?


As a guess, try this:

context().response().setHeader("Value","Key");
WORedirect redirect = new WORedirect(this.context());
redirect.setUrl("http://someurl.nl";);
WOResponse r = redirect.generateResponse();

It does not seem to apply the header values to the actual of the url.
Is there perhaps a way to call the url directly with my own headers, instead
of a redirect. Perhaps with a direct action?


I think you are confusing "form values" and "headers". Form values go on the URL (or in the content of the HTTP message). Headers are meta- data that come at the start of the HTTP message. If you want them on the URL, you will have to add them yourself.

Chuck

--
Chuck Hill             Senior Consultant / VP Development

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to