1 /* 2 * Copyright 2008 Netflix, Inc. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package net.oauth.http; 18 19 import java.io.IOException; 20 import net.oauth.OAuthMessage; 21 22 /** 23 * @hide 24 */ 25 public interface HttpClient 26 { 27 /** 28 * Send an HTTP request and return the response. 29 * <p> 30 * Don't follow redirects. If a redirect response is received, simply return 31 * it (with a statusCode and LOCATION header). 32 */ 33 HttpResponseMessage execute(HttpMessage request) throws IOException; 34 35 static final String GET = OAuthMessage.GET; 36 static final String POST = OAuthMessage.POST; 37 static final String PUT = OAuthMessage.PUT; 38 static final String DELETE = OAuthMessage.DELETE; 39 40 } 41