首页 > 试题广场 > 下面HttpServletResponse方法调用,那些给客
[不定项选择题]
下面HttpServletResponse方法调用,那些给客户端回应了一个定制的HTTP回应头:(    )
  • response.setHeader("X-MyHeader", "34");
  • response.addHeader("X-MyHeader", "34");
  • response.setHeader(new HttpHeader("X-MyHeader", "34"));
  • response.addHeader(new HttpHeader("X-MyHeader", "34"));
  • response.addHeader(new ServletHeader("X-MyHeader", "34"));
  • response.setHeader(new ServletHeader("X-MyHeader", "34"));
response.setHeader("X-MyHeader", "34");是将http请求头重新替换,
response.addHeader("X-MyHeader", "34");是在原有的请求头后添加。
发表于 2019-12-07 10:33:55 回复(0)