JGithubHttp
Extends \JHttpHTTP client class for connecting to a GitHub instance.
| package |
Joomla.Platform |
|---|---|
| subpackage |
GitHub |
| since |
11.3 |
Methods
__construct
Constructor.
__construct(\JRegistry &$options = null, \JHttpTransport $transport = null)
delete
Method to send the DELETE command to the server.
delete(string $url, array $headers = null) : \JHttpResponse
| since |
11.3 |
|---|
Arguments
- $url
stringPath to the resource.- $headers
arrayAn array of name-value pairs to include in the header of the request.
Response
get
Method to send the GET command to the server.
get(string $url, array $headers = null) : \JHttpResponse
| since |
11.3 |
|---|
Arguments
- $url
stringPath to the resource.- $headers
arrayAn array of name-value pairs to include in the header of the request.
Response
getOption
Get an option from the HTTP client.
getOption(string $key) : mixed
| since |
11.3 |
|---|
Arguments
- $key
stringThe name of the option to get.
Response
mixedThe option value.
head
Method to send the HEAD command to the server.
head(string $url, array $headers = null) : \JHttpResponse
| since |
11.3 |
|---|
Arguments
- $url
stringPath to the resource.- $headers
arrayAn array of name-value pairs to include in the header of the request.
Response
options
Method to send the OPTIONS command to the server.
options(string $url, array $headers = null) : \JHttpResponse
| since |
11.3 |
|---|
Arguments
- $url
stringPath to the resource.- $headers
arrayAn array of name-value pairs to include in the header of the request.
Response
patch
Method to send the PATCH command to the server.
patch(string $url, mixed $data, array $headers = null) : \JHttpResponse
| since |
11.3 |
|---|
Arguments
- $url
stringPath to the resource.- $data
mixedEither an associative array or a string to be sent with the request.- $headers
arrayAn array of name-value pairs to include in the header of the request.
Response
post
Method to send the POST command to the server.
post(string $url, mixed $data, array $headers = null) : \JHttpResponse
| since |
11.3 |
|---|
Arguments
- $url
stringPath to the resource.- $data
mixedEither an associative array or a string to be sent with the request.- $headers
arrayAn array of name-value pairs to include in the header of the request.
Response
put
Method to send the PUT command to the server.
put(string $url, mixed $data, array $headers = null) : \JHttpResponse
| since |
11.3 |
|---|
Arguments
- $url
stringPath to the resource.- $data
mixedEither an associative array or a string to be sent with the request.- $headers
arrayAn array of name-value pairs to include in the header of the request.
Response
setOption
Set an option for the HTTP client.
setOption(string $key, mixed $value) : \JHttp
| since |
11.3 |
|---|
Arguments
- $key
stringThe name of the option to set.- $value
mixedThe option value to set.
Response
\JHttpThis object for method chaining.
trace
Method to send the TRACE command to the server.
trace(string $url, array $headers = null) : \JHttpResponse
| since |
11.3 |
|---|
Arguments
- $url
stringPath to the resource.- $headers
arrayAn array of name-value pairs to include in the header of the request.
Response
Constants
AUTHENTICATION_NONE
| Value | 0 |
|---|---|
| const |
integer Use no authentication for HTTP connections. |
| since |
11.3 |
Type(s)
AUTHENTICATION_BASIC
| Value | 1 |
|---|---|
| const |
integer Use basic authentication for HTTP connections. |
| since |
11.3 |
Type(s)
AUTHENTICATION_OAUTH
| Value | 2 |
|---|---|
| const |
integer Use OAuth authentication for HTTP connections. |
| since |
11.3 |
Type(s)
Properties
transport
The HTTP transport object to use in sending HTTP requests.