This repository was archived by the owner on Jan 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 143
Expand file tree
/
Copy pathRequestInterface.php
More file actions
85 lines (74 loc) · 1.58 KB
/
RequestInterface.php
File metadata and controls
85 lines (74 loc) · 1.58 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
<?php
/**
* @license Copyright 2011-2014 BitPay Inc., MIT License
* see https://github.com/bitpay/php-bitpay-client/blob/master/LICENSE
*/
namespace Bitpay\Client;
/**
*
* @package Bitpay
*/
interface RequestInterface
{
const METHOD_POST = 'POST';
const METHOD_GET = 'GET';
const METHOD_PUT = 'PUT';
const METHOD_DELETE = 'DELETE';
/**
* Returns the method for this request
*
* @return string
*/
public function getMethod();
/**
* Should always return https
*
* @return string
*/
public function getSchema();
/**
* Returns the host to send the request to. The host would be something
* such as `test.bitpay.com` or `bitpay.com`
*
* @return string
*/
public function getHost();
/**
* Returns port to send request on
*
* @return integer
*/
public function getPort();
/**
* example of path is `api/invoice` as this is appended to $host
*
* @return string
*/
public function getPath();
/**
* Returns $schema://$host:$port/$path
*
* @return string
*/
public function getUri();
/**
* Checks the request to see if the method matches a known value
*
* @param string $method
*
* @return boolean
*/
public function isMethod($method);
/**
* Returns the request body
*
* @return string
*/
public function getBody();
/**
* Returns a $key => $value array of http headers
*
* @return array
*/
public function getHeaders();
}