예제 #1
0
 /**
  * Cleans the current header entries and copies all header entries of the specified {@code
  * headers}.
  *
  * @return {@code this}
  */
 public HttpHeaders set(HttpHeaders headers) {
   if (headers == null) {
     throw new NullPointerException("headers");
   }
   clear();
   for (Map.Entry<String, String> e : headers) {
     add(e.getKey(), e.getValue());
   }
   return this;
 }
예제 #2
0
 @Override
 public void reset() {
   headers.clear();
   status = HttpResponseStatus.OK;
 }