source: josm/trunk/src/oauth/signpost/http/HttpRequest.java@ 12139

Last change on this file since 12139 was 10831, checked in by Don-vip, 8 years ago

see #13232 - cleanup OAuth signpost code:

  • remove classes unused by JOSM
  • add missing @Override annotations
File size: 1.1 KB
Line 
1package oauth.signpost.http;
2
3import java.io.IOException;
4import java.io.InputStream;
5import java.util.Map;
6
7import oauth.signpost.OAuthConsumer;
8
9/**
10 * A concise description of an HTTP request. Contains methods to access all
11 * those parts of an HTTP request which Signpost needs to sign a message. If you
12 * want to extend Signpost to sign a different kind of HTTP request than those
13 * currently supported, you'll have to write an adapter which implements this
14 * interface and a custom {@link OAuthConsumer} which performs the wrapping.
15 *
16 * @author Matthias Kaeppler
17 */
18public interface HttpRequest {
19
20 String getMethod();
21
22 String getRequestUrl();
23
24 void setRequestUrl(String url);
25
26 void setHeader(String name, String value);
27
28 String getHeader(String name);
29
30 Map<String, String> getAllHeaders();
31
32 InputStream getMessagePayload() throws IOException;
33
34 String getContentType();
35
36 /**
37 * Returns the wrapped request object, in case you must work directly on it.
38 *
39 * @return the wrapped request object
40 */
41 Object unwrap();
42}
Note: See TracBrowser for help on using the repository browser.