0

Look at this very basic Java code: It is a very simple REST webservice which returns JSON data:

@GET
@Path("/test")
public JsonArray test()
{
    JsonArrayBuilder jsonReader = Json.createArrayBuilder();

    jsonReader.add(...);
    jsonReader.add(...);

    return  (JsonArray) jsonReader.build();
}

It works fine, but i want to send a specific http header in response. But i cannot do it because the return type is JsonArray. How can i send this header ?

Thanks

Bob5421
  • 7,757
  • 14
  • 81
  • 175

0 Answers0