BUG-2218: Keep existing link augmentations during discovery process
[controller.git] / opendaylight / adsal / commons / httpclient / src / main / java / org / opendaylight / controller / commons / httpclient / HTTPRequest.java
1 /*\r
2  * Copyright IBM Corporation, 2013.  All rights reserved.\r
3  *\r
4  * This program and the accompanying materials are made available under the\r
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,\r
6  * and is available at http://www.eclipse.org/legal/epl-v10.html\r
7  */\r
8 \r
9 package org.opendaylight.controller.commons.httpclient;\r
10 \r
11 import java.util.List;\r
12 import java.util.Map;\r
13 \r
14 \r
15 public class HTTPRequest {\r
16     // the HTTP method to use: currently GET, POST, PUT, and DELETE are supported\r
17     String method;\r
18 \r
19     // the full URI to send to (including protocol)\r
20     String uri;\r
21 \r
22     // the entity body to send\r
23     String entity;\r
24 \r
25     // additional headers (separate from content-type) to include in the request\r
26     Map<String, List<String>> headers;\r
27 \r
28     // timeout in milliseconds.  Defaults to 3 seconds\r
29     int timeout;\r
30 \r
31     // content type to set.  Defaults to application/json\r
32     String contentType;\r
33 \r
34     public HTTPRequest() {\r
35         timeout = 3000;\r
36         contentType = "application/json";\r
37     }\r
38 \r
39     public String getMethod() {\r
40         return method;\r
41     }\r
42 \r
43     public void setMethod(String method) {\r
44         this.method = method;\r
45     }\r
46 \r
47     public String getUri() {\r
48         return uri;\r
49     }\r
50 \r
51     public void setUri(String uri) {\r
52         this.uri = uri;\r
53     }\r
54 \r
55     public String getEntity() {\r
56         return entity;\r
57     }\r
58 \r
59     public void setEntity(String entity) {\r
60         this.entity = entity;\r
61     }\r
62 \r
63     public Map<String, List<String>> getHeaders() {\r
64         return headers;\r
65     }\r
66 \r
67     public void setHeaders(Map<String, List<String>> headers) {\r
68         this.headers = headers;\r
69     }\r
70 \r
71     public int getTimeout() {\r
72         return timeout;\r
73     }\r
74 \r
75     public void setTimeout(int timeout) {\r
76         this.timeout = timeout;\r
77     }\r
78 \r
79     public String getContentType() {\r
80         return contentType;\r
81     }\r
82 \r
83     public void setContentType(String contentType) {\r
84         this.contentType = contentType;\r
85     }\r
86 }\r