1e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes/* 2e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * Licensed to the Apache Software Foundation (ASF) under one or more 3e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * contributor license agreements. See the NOTICE file distributed with 4e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * this work for additional information regarding copyright ownership. 5e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * The ASF licenses this file to You under the Apache License, Version 2.0 6e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * (the "License"); you may not use this file except in compliance with 7e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * the License. You may obtain a copy of the License at 8e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * 9e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * http://www.apache.org/licenses/LICENSE-2.0 10e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * 11e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * Unless required by applicable law or agreed to in writing, software 12e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * distributed under the License is distributed on an "AS IS" BASIS, 13e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * See the License for the specific language governing permissions and 15e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * limitations under the License. 16e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes */ 17e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 18e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughespackage tests.support; 19e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 20e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughesimport java.io.IOException; 21e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughesimport java.io.InputStream; 22e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughesimport java.io.OutputStream; 23e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 24e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes/** 25e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * This interface contains the basic methods necessary to open and use a 26e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * connection to an HTTP server. 27e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes * 28e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes */ 29e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughespublic interface Support_HttpConnector { 30e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 31e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes public void open(String address) throws IOException; 32e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 33e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes public void close() throws IOException; 34e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 35e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes public InputStream getInputStream() throws IOException; 36e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 37e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes public OutputStream getOutputStream() throws IOException; 38e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 39e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes public boolean isChunkedOnFlush(); 40e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 41e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes public void setRequestProperty(String key, String value) throws IOException; 42e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 43e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes public String getHeaderField(int index) throws IOException; 44e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 45e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes public String getHeaderFieldKey(int index) throws IOException; 46e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes 47e98fbf8686c5289bf03fe5c3de7ff82d3a77104dElliott Hughes} 48