-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathHttpRequest.php
More file actions
125 lines (111 loc) · 2.49 KB
/
HttpRequest.php
File metadata and controls
125 lines (111 loc) · 2.49 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
<?php
/*
* BandwidthLib
*
* This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
*/
namespace BandwidthLib\Http;
/**
* Represents a single Http Request
*/
class HttpRequest
{
/**
* Http method as defined in HttpMethod class
* @var string
*/
private $httpMethod = null;
/**
* Headers
* @var array
*/
private $headers = null;
/**
* Query url
* @var string
*/
private $queryUrl = null;
/**
* Input parameters
* @var array
*/
private $parameters = null;
/**
* Create a new HttpRequest
* @param string|null $httpMethod Http method
* @param array|null $headers Map of headers
* @param string|null $queryUrl Query url
* @param array|null $parameters Map of parameters sent
*/
public function __construct(?string $httpMethod = null, ?array $headers = null, ?string $queryUrl = null, ?array $parameters = null)
{
$this->httpMethod = $httpMethod;
$this->headers = $headers;
$this->queryUrl = $queryUrl;
$this->parameters = $parameters;
}
/**
* Get http method
* @return string
*/
public function getHttpMethod()
{
return $this->httpMethod;
}
/**
* Set http method
* @param string $httpMethod Http Method as defined in HttpMethod class
*/
public function setHttpMethod(string $httpMethod)
{
$this->httpMethod = $httpMethod;
}
/**
* Get headers
* @return array Map of headers
*/
public function getHeaders()
{
return $this->headers;
}
/**
* Set headers
* @param array $headers Headers as map
*/
public function setHeaders(array $headers)
{
$this->headers = $headers;
}
/**
* Get query url
* @return string Query url
*/
public function getQueryUrl()
{
return $this->queryUrl;
}
/**
* Set query url
* @param string $queryUrl Query url
*/
public function setQueryUrl(string $queryUrl)
{
$this->queryUrl = $queryUrl;
}
/**
* Get parameters
* @return array Map of input parameters
*/
public function getParameters()
{
return $this->parameters;
}
/**
* Set parameters
* @param array $parameters Map of input parameters
*/
public function setParameters(array $parameters)
{
$this->parameters = $parameters;
}
}