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