Maybe I'm blind, but I don't see how to set a header in a response.
I need to set the Location header on a response to a POST, but I can't
seem to find the right place to do that. What am I missing?
--Chuck
Chuck Hinson
Gestalt LLC
phone: 610.994.2833
IM: c
> Maybe I'm blind, but I don't see how to set a header in a response.
>
> I need to set the Location header on a response to a POST, but I can't
> seem to find the right place to do that. What am I missing?
response.setStatus(Status.SUCCESS_CREATED);
response.setRedirectRef(request.getRootR
>
Jerome,
> All standard HTTP headers have an equivalent class/property in the Restlet
> API. It was a deliberate choice to not expose those headers as first-class
> citizens, because we consider them as lower-level artifacts and because we
> want to support multiple protocols via the same API.
>
.org
> Objet : Re: Response Headers
>
> >
> Jerome,
>
> > All standard HTTP headers have an equivalent class/property
> in the Restlet
> > API. It was a deliberate choice to not expose those headers
> as first-class
> > citizens, because we consider them as
ruary 11, 2007 8:51 PM
To: discuss@restlet.tigris.org
Subject: Re: Response Headers
> Maybe I'm blind, but I don't see how to set a header in a response.
>
> I need to set the Location header on a response to a POST, but I can't
> seem to find the right plac
;origine-
> De : Chuck Hinson [mailto:[EMAIL PROTECTED]
> Envoyé : lundi 12 février 2007 06:36
> À : discuss@restlet.tigris.org
> Objet : RE: Re: Response Headers
>
> Umm. OK, thanks. Not was I was expecting, but I'll take it.
>
> However, the more generic quest
Hello,
I need to add a specific header in the response, I see an exemple on the
org.restlet.examples.misc.HeadersTest that I used to create the following code:
Series headers = (Series)
request.getAttributes().get("org.restlet.http.headers");
headers.add(HTTP_HEADER_ERROR200_SUPPORT, String.val
I'm using Restlet 2.1m3 in Tomcat 6.0.32 with JDK 1.6.0_24 on Linux.
I'm trying to pass along the X-Forwarded-For header in my
redirectSeeOther(String) call. Is this possible?
getResponse().getAttributes().put("org.restlet.http.headers", new
Form("X-Forwarded-For=192.168.1.1")) followed by
ge
-Chuck
-Original Message-
From: Jerome Louvel [mailto:[EMAIL PROTECTED]
Sent: Monday, February 12, 2007 4:38 AM
To: discuss@restlet.tigris.org
Subject: RE: Re: Response Headers
Hi Chuck,
All standard HTTP headers have an equivalent class/property in the Restlet API.
It was a deliberat
s long as the discussion stays
constructive. There is always an opportunity to influence changes in version
1.1, 2.0, etc.
Best regards,
Jerome
> -Message d'origine-
> De : Chuck Hinson [mailto:[EMAIL PROTECTED]
> Envoyé : lundi 12 février 2007 15:27
> À : discuss@restlet.ti
Hi Loic,
I think you could just remove the third of your lines.
best regards
Stephan
[EMAIL PROTECTED] schrieb:
Hello,
I need to add a specific header in the response, I see an exemple on
the org.restlet.examples.misc.HeadersTest that I used to create the
following code:
Series headers =
ders, add mines and reset the
header in the request, I have a lot of warning in the log!
Regards,
Loïc
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 29 July 2008 17:15
To: discuss@restlet.tigris.org
Subject: Re: Modifying the response headers
Hi Loic,
I think
.
Best regards,
Jerome
-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 30 juillet 2008 09:29
À : discuss@restlet.tigris.org
Objet : RE: Modifying the response headers
Hello,
I'm not sure I understand your answer.
I try to remove the
I exactly do what it's my mail, I just add my custom header (not in the list)
and then I got all the warnings!
-Original Message-
From: Jerome Louvel [mailto:[EMAIL PROTECTED]
Sent: 30 July 2008 09:52
To: discuss@restlet.tigris.org
Subject: RE: Modifying the response headers
Hi
: discuss@restlet.tigris.org
Objet : RE: Modifying the response headers
I exactly do what it's my mail, I just add my custom header (not in the
list) and then I got all the warnings!
-Original Message-
From: Jerome Louvel [mailto:[EMAIL PROTECTED]
Sent: 30 July 2008 09
Issue opened: http://restlet.tigris.org/issues/show_bug.cgi?id=538
-Original Message-
From: Jerome Louvel [mailto:[EMAIL PROTECTED]
Sent: 30 July 2008 14:31
To: discuss@restlet.tigris.org
Subject: RE: Modifying the response headers
Oh, I see now. Then it's probably a bug! :-)
I
I'd really love to
contribute, but right now I have other things demanding my attention.
--Chuck
-Original Message-
From: Jerome Louvel [mailto:[EMAIL PROTECTED]
Sent: Monday, February 12, 2007 12:18 PM
To: discuss@restlet.tigris.org
Subject: RE: RE: Re: Response Headers
Chuck,
The
lundi 12 février 2007 22:08
> À : discuss@restlet.tigris.org
> Objet : RE: RE: RE: Re: Response Headers
>
> OK. So it appears that I am blind - the answers were right
> there and I just didn't see them. Thanks.
>
> As for abstraction and protocol independence part, I&
Hello,
I'm pretty new to Restlet and am a little stuck figuring out the best way to do
the following. I need to do a server-side redirect on a given url to a
rewritten url on our couchdb server (I guess this is a kind of reverse proxy).
But I don't want to return anything to the client that e
Just to be clear. A non-redirected response for me includes the following
header:
Server: Apache-Coyote/1.1, Restlet-Framework/2.0.6
When I do a redirect I get back a response with the following header:
Server: Apache-Coyote/1.1, CouchDB/1.1.1 (Erlang OTP/R14B)
Thanks,
Tim
Previously in 2.0.x, I added response headers as follows,
Form responseHeaders = (Form)
getResponse().getAttributes().get("org.restlet.http.headers");
if (responseHeaders == null) {
responseHeaders = new Form();
getResponse().getAttributes().put("org.restl
(HeaderConstants.ATTRIBUTE_HEADERS,
responseHeaders);
}
responseHeaders.add(new Header("Access-Control-Allow-Origin",
"*"));
On Tue, Jan 31, 2012 at 5:45 PM, Michael Kaye wrote:
> Previously in 2.0.x, I added response headers as follows,
&
22 matches
Mail list logo