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
EOMONTH, EDATE & NETWORKDAYS alternative
access forms condition formatting in unbound combo box
Oracle Export/Import
(Simple) Creating array, appending and recreating.
sql syntax help in my vba code when primary key field has spaces
Cisco ASA-Routing traffic to particular subnets over IPSEC tunnel when traffic is not originated on the ASA.
Getting this warning in the system log "An error was detected on device \Device\Harddisk0 during a paging operation."
How can I trigger a macro when the "send to mail" function is used?
Managing systems in a trusted domain from a single EPO server
Getting bounce back messages when sending to internal domain users after moving to SBS 2008