001 /* 002 * Copyright 1999-2002,2004 The Apache Software Foundation. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017 package org.apache.commons.latka.http; 018 019 import java.util.List; 020 021 /** 022 * Manage a set of http request headers 023 * 024 * @author Morgan Delagrange 025 * @author dIon Gillard 026 * @version $Id: RequestHeaders.java 155424 2005-02-26 13:09:29Z dirkv $ 027 */ 028 public interface RequestHeaders { 029 030 /** 031 * Add a header to the request 032 * @param headerName header name 033 * @param headerValue header value, or null for an empty value 034 */ 035 void addHeader(String headerName, String headerValue); 036 037 /** 038 * Return a list of all the headers for the request. 039 * Elements of the list are a String array with the 040 * headerName as the first value and the header value 041 * as the second (can be null). 042 * @return all headers for the request 043 */ 044 List getHeaders(); 045 046 }