1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 package org.apache.hc.client5.http.async.methods;
29
30 import java.net.URI;
31
32 import org.apache.hc.client5.http.config.Configurable;
33 import org.apache.hc.client5.http.config.RequestConfig;
34 import org.apache.hc.core5.http.HttpHost;
35 import org.apache.hc.core5.http.message.BasicHttpRequest;
36 import org.apache.hc.core5.net.URIAuthority;
37
38
39
40
41
42
43 public class ConfigurableHttpRequest extends BasicHttpRequest implements Configurable {
44
45 private static final long serialVersionUID = 1L;
46 private RequestConfig requestConfig;
47
48 public ConfigurableHttpRequest(final String method, final String path) {
49 super(method, path);
50 }
51
52 public ConfigurableHttpRequest(final String method, final HttpHost host, final String path) {
53 super(method, host, path);
54 }
55
56
57
58
59 public ConfigurableHttpRequest(final String method, final String scheme, final URIAuthority authority, final String path) {
60 super(method, scheme, authority, path);
61 }
62
63 public ConfigurableHttpRequest(final String method, final URI requestUri) {
64 super(method, requestUri);
65 }
66
67 @Override
68 public RequestConfig getConfig() {
69 return requestConfig;
70 }
71
72 public void setConfig(final RequestConfig requestConfig) {
73 this.requestConfig = requestConfig;
74 }
75
76 }
77