~tcuthbert/wordpress/openstack-objectstorage-k8s

« back to all changes in this revision

Viewing changes to vendor/guzzlehttp/guzzle/src/Message/RequestInterface.php

  • Committer: Thomas Cuthbert
  • Date: 2020-04-23 05:22:45 UTC
  • Revision ID: thomas.cuthbert@canonical.com-20200423052245-1jxao3mw31w435js
[,r=trivial] bionic composer vendor update

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
namespace GuzzleHttp\Message;
 
3
 
 
4
use GuzzleHttp\Event\HasEmitterInterface;
 
5
use GuzzleHttp\Query;
 
6
 
 
7
/**
 
8
 * Generic HTTP request interface
 
9
 */
 
10
interface RequestInterface extends MessageInterface, HasEmitterInterface
 
11
{
 
12
    /**
 
13
     * Sets the request URL.
 
14
     *
 
15
     * The URL MUST be a string, or an object that implements the
 
16
     * `__toString()` method.
 
17
     *
 
18
     * @param string $url Request URL.
 
19
     *
 
20
     * @throws \InvalidArgumentException If the URL is invalid.
 
21
     */
 
22
    public function setUrl($url);
 
23
 
 
24
    /**
 
25
     * Gets the request URL as a string.
 
26
     *
 
27
     * @return string Returns the URL as a string.
 
28
     */
 
29
    public function getUrl();
 
30
 
 
31
    /**
 
32
     * Get the resource part of the the request, including the path, query
 
33
     * string, and fragment.
 
34
     *
 
35
     * @return string
 
36
     */
 
37
    public function getResource();
 
38
 
 
39
    /**
 
40
     * Get the collection of key value pairs that will be used as the query
 
41
     * string in the request.
 
42
     *
 
43
     * @return Query
 
44
     */
 
45
    public function getQuery();
 
46
 
 
47
    /**
 
48
     * Set the query string used by the request
 
49
     *
 
50
     * @param array|Query $query Query to set
 
51
     */
 
52
    public function setQuery($query);
 
53
 
 
54
    /**
 
55
     * Get the HTTP method of the request.
 
56
     *
 
57
     * @return string
 
58
     */
 
59
    public function getMethod();
 
60
 
 
61
    /**
 
62
     * Set the HTTP method of the request.
 
63
     *
 
64
     * @param string $method HTTP method
 
65
     */
 
66
    public function setMethod($method);
 
67
 
 
68
    /**
 
69
     * Get the URI scheme of the request (http, https, etc.).
 
70
     *
 
71
     * @return string
 
72
     */
 
73
    public function getScheme();
 
74
 
 
75
    /**
 
76
     * Set the URI scheme of the request (http, https, etc.).
 
77
     *
 
78
     * @param string $scheme Scheme to set
 
79
     */
 
80
    public function setScheme($scheme);
 
81
 
 
82
    /**
 
83
     * Get the port scheme of the request (e.g., 80, 443, etc.).
 
84
     *
 
85
     * @return int
 
86
     */
 
87
    public function getPort();
 
88
 
 
89
    /**
 
90
     * Set the port of the request.
 
91
     *
 
92
     * Setting a port modifies the Host header of a request as necessary.
 
93
     *
 
94
     * @param int $port Port to set
 
95
     */
 
96
    public function setPort($port);
 
97
 
 
98
    /**
 
99
     * Get the host of the request.
 
100
     *
 
101
     * @return string
 
102
     */
 
103
    public function getHost();
 
104
 
 
105
    /**
 
106
     * Set the host of the request including an optional port.
 
107
     *
 
108
     * Including a port in the host argument will explicitly change the port of
 
109
     * the request. If no port is found, the default port of the current
 
110
     * request scheme will be utilized.
 
111
     *
 
112
     * @param string $host Host to set (e.g. www.yahoo.com, www.yahoo.com:80)
 
113
     */
 
114
    public function setHost($host);
 
115
 
 
116
    /**
 
117
     * Get the path of the request (e.g. '/', '/index.html').
 
118
     *
 
119
     * @return string
 
120
     */
 
121
    public function getPath();
 
122
 
 
123
    /**
 
124
     * Set the path of the request (e.g. '/', '/index.html').
 
125
     *
 
126
     * @param string|array $path Path to set or array of segments to implode
 
127
     */
 
128
    public function setPath($path);
 
129
 
 
130
    /**
 
131
     * Get the request's configuration options.
 
132
     *
 
133
     * @return \GuzzleHttp\Collection
 
134
     */
 
135
    public function getConfig();
 
136
}