Microsoft
Software
Hardware
Network
Question : Insert info into an HTTP header
I’m trying to add some data to the http header that comes back from a RESTful web service call. Is it possible to use JAX-RS or something else to add data to the response header?
Example of my rest method:
@GET
@Path("getAssets")
public List<Asset> getAssets(@QueryParam("pag
e") @DefaultValue("1") String page,
@QueryParam("page_size") @DefaultValue(UNLIMITED) String pageSize) throws Exception
{
stuff…
}
Thanks for your help.
Answer : Insert info into an HTTP header
For anybody interested in how I solved my problem
. I used the javax.ws.rs.core.Context annotation.
@Context
HttpServletResponse response;
Then in my service methods I added this:
response.addHeader("n
ame", "value");
That is it.
Random Solutions
How do you edit the GPO for WSUS in 2008 R2
How to know when a TMemo's control has had text selected?
php5 classes and lazy loading
Lookup and Copy the content from another workbook
Help with top 1 relational query
SCCM Site Boundries
Right-click extremely slow on Windows XP
Signal/Alert when a file has been placed/created in a directory
Any plugin for winamp or any sort of application that does something simular to Pause Between Songs
VB6 to VB.NET Convert decrypt function