Last change
on this file since 12298 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 | |
---|
1 | package oauth.signpost.http;
|
---|
2 |
|
---|
3 | import java.io.IOException;
|
---|
4 | import java.io.InputStream;
|
---|
5 | import java.util.Map;
|
---|
6 |
|
---|
7 | import 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 | */
|
---|
18 | public 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.