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