2 * Copyright IBM Corporation, 2013. All rights reserved.
\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
9 package org.opendaylight.controller.commons.httpclient;
\r
11 import java.util.List;
\r
12 import java.util.Map;
\r
15 public class HTTPRequest {
\r
16 // the HTTP method to use: currently GET, POST, PUT, and DELETE are supported
\r
19 // the full URI to send to (including protocol)
\r
22 // the entity body to send
\r
25 // additional headers (separate from content-type) to include in the request
\r
26 Map<String, List<String>> headers;
\r
28 // timeout in milliseconds. Defaults to 3 seconds
\r
31 // content type to set. Defaults to application/json
\r
34 public HTTPRequest() {
\r
36 contentType = "application/json";
\r
39 public String getMethod() {
\r
43 public void setMethod(String method) {
\r
44 this.method = method;
\r
47 public String getUri() {
\r
51 public void setUri(String uri) {
\r
55 public String getEntity() {
\r
59 public void setEntity(String entity) {
\r
60 this.entity = entity;
\r
63 public Map<String, List<String>> getHeaders() {
\r
67 public void setHeaders(Map<String, List<String>> headers) {
\r
68 this.headers = headers;
\r
71 public int getTimeout() {
\r
75 public void setTimeout(int timeout) {
\r
76 this.timeout = timeout;
\r
79 public String getContentType() {
\r
83 public void setContentType(String contentType) {
\r
84 this.contentType = contentType;
\r