1.9.30 sync.
[gae.git] / java / src / main / com / google / appengine / api / urlfetch / HTTPHeader.java
blob102e06adee16f656e8300dbd17f3f2c2899ca562
1 // Copyright 2007 Google Inc. All rights reserved.
3 package com.google.appengine.api.urlfetch;
5 import java.io.Serializable;
7 /**
8 * {@code HTTPHeader} can represent either an HTTP request header, or
9 * an HTTP response header.
12 public class HTTPHeader implements Serializable {
13 private final String name;
14 private final String value;
16 /**
17 * Creates a new header with the specified name and value.
19 * @param name a not {@code null} name
20 * @param value may be a single value or a comma-separated list of values
21 * for multivalued headers such as {@code Accept} or {@code Set-Cookie}.
23 public HTTPHeader(String name, String value) {
24 this.name = name;
25 this.value = value;
28 public String getName() {
29 return name;
32 public String getValue() {
33 return value;