Last change
on this file since 12212 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.basic;
|
---|
2 |
|
---|
3 | import java.io.IOException;
|
---|
4 | import java.io.InputStream;
|
---|
5 | import java.util.Collections;
|
---|
6 | import java.util.Map;
|
---|
7 |
|
---|
8 | import oauth.signpost.http.HttpRequest;
|
---|
9 |
|
---|
10 | public class UrlStringRequestAdapter implements HttpRequest {
|
---|
11 |
|
---|
12 | private String url;
|
---|
13 |
|
---|
14 | public UrlStringRequestAdapter(String url) {
|
---|
15 | this.url = url;
|
---|
16 | }
|
---|
17 |
|
---|
18 | @Override
|
---|
19 | public String getMethod() {
|
---|
20 | return "GET";
|
---|
21 | }
|
---|
22 |
|
---|
23 | @Override
|
---|
24 | public String getRequestUrl() {
|
---|
25 | return url;
|
---|
26 | }
|
---|
27 |
|
---|
28 | @Override
|
---|
29 | public void setRequestUrl(String url) {
|
---|
30 | this.url = url;
|
---|
31 | }
|
---|
32 |
|
---|
33 | @Override
|
---|
34 | public void setHeader(String name, String value) {
|
---|
35 | }
|
---|
36 |
|
---|
37 | @Override
|
---|
38 | public String getHeader(String name) {
|
---|
39 | return null;
|
---|
40 | }
|
---|
41 |
|
---|
42 | @Override
|
---|
43 | public Map<String, String> getAllHeaders() {
|
---|
44 | return Collections.emptyMap();
|
---|
45 | }
|
---|
46 |
|
---|
47 | @Override
|
---|
48 | public InputStream getMessagePayload() throws IOException {
|
---|
49 | return null;
|
---|
50 | }
|
---|
51 |
|
---|
52 | @Override
|
---|
53 | public String getContentType() {
|
---|
54 | return null;
|
---|
55 | }
|
---|
56 |
|
---|
57 | @Override
|
---|
58 | public Object unwrap() {
|
---|
59 | return url;
|
---|
60 | }
|
---|
61 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.