에 추가 헤더, 나는 다음과 같은 방법이 있습니다 저지 : 내가 저지를 사용하고 서버 응답
@POST
@Path("hello")
@Produces(MediaType.TEXT_HTML)
public String hello(@FormParam("username") String username)
{
Gson gson = new Gson();
CommunicationResponseM result = new CommunicationResponseM();
String result = "hello";
return gson.toJson(result);
}
지금까지 모든 것이 잘 진행을하지만, 지금은 약간의 헤더를 추가해야합니다. 어떻게해야합니까?
감사합니다.
는 PS :
나는이 방법으로 저지 서버를 시작 :
final HttpServer server = HttpServerFactory.create(baseUrl);
server.start();
참고 : 첫 번째 링크의 ID가 잘못되었습니다 (# d4e357) – informatik01