OAuthRequest
class OAuthRequest
This class represents an outgoing OAuth request to be sent to an OAuth provider.
Properties
private string | $url | Url of the endpoint of the OAuth provider | |
private string | $method | HTTP method for the request | |
private array | $headers | The request-header fields to pass additional information about the request, and about the client itself, to the provider. | |
private string | $body | The optional request body content |
Methods
Constructs a OAuth request object
Returns the url of the endpoint of the OAuth provider
Returns the HTTP method for the request
Returns the request-header fields
Returns the body content of the request
Sets the url of the endpoint of the OAuth provider
Sets the HTTP method for the request
Sets the request-header fields
Sets the body content of the request
Details
at line 48
__construct(string $url, string $method, array $headers = [], string|null $body = null)
Constructs a OAuth request object
at line 60
string
getUrl()
Returns the url of the endpoint of the OAuth provider
at line 69
string
getMethod()
Returns the HTTP method for the request
at line 78
array
getHeaders()
Returns the request-header fields
at line 87
string
getBody()
Returns the body content of the request
at line 98
OAuthRequest
setUrl(string $url)
Sets the url of the endpoint of the OAuth provider
at line 110
OAuthRequest
setMethod(string $method)
Sets the HTTP method for the request
at line 122
OAuthRequest
setHeaders(array $headers)
Sets the request-header fields
at line 134
OAuthRequest
setBody(string $body)
Sets the body content of the request