2 * Copyright (c) 2019 Ericsson India Global Services Pvt Ltd. and others. All rights reserved.
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
9 package org.opendaylight.openflowjava.protocol.impl.util;
11 import java.util.List;
14 public class HTTPRequest {
15 // the HTTP method to use: currently GET, POST, PUT, and DELETE are
18 // the full URI to send to (including protocol)
20 // the entity body to send
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
26 // content type to set. Defaults to application/json
29 public HTTPRequest() {
31 contentType = "application/json";
34 public String getMethod() {
38 public void setMethod(String method) {
42 public String getUri() {
46 public void setUri(String uri) {
50 public String getEntity() {
54 public void setEntity(String entity) {
58 public Map<String, List<String>> getHeaders() {
62 public void setHeaders(Map<String, List<String>> headers) {
63 this.headers = headers;
66 public int getTimeout() {
70 public void setTimeout(int timeout) {
71 this.timeout = timeout;
74 public String getContentType() {
78 public void setContentType(String contentType) {
79 this.contentType = contentType;