HttpClientInterface
in
Table of Contents
Methods
- delete() : ResponseInterface
- Delete request
- get() : ResponseInterface
- Get request
- getPaginated() : PaginatedResponse
- Get request with pagination support
- patch() : ResponseInterface
- Patch request
- post() : ResponseInterface
- Post request
- put() : ResponseInterface
- Put request
- rawRequest() : ResponseInterface
- Make a raw request to any Canvas URL
- request() : ResponseInterface
- Make a request
- requestPaginated() : PaginatedResponse
- Make a request with pagination support
Methods
delete()
Delete request
public
delete(string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
ResponseInterfaceget()
Get request
public
get(string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
ResponseInterfacegetPaginated()
Get request with pagination support
public
getPaginated(string $url[, array<string|int, mixed> $options = [] ]) : PaginatedResponse
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
PaginatedResponsepatch()
Patch request
public
patch(string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
ResponseInterfacepost()
Post request
public
post(string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
ResponseInterfaceput()
Put request
public
put(string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
ResponseInterfacerawRequest()
Make a raw request to any Canvas URL
public
rawRequest(string $url[, string $method = 'GET' ][, array<string|int, mixed> $options = [] ]) : ResponseInterface
This method allows direct API calls to arbitrary Canvas URLs, useful for:
- Following pagination URLs returned by Canvas
- Calling custom or undocumented endpoints
- Handling webhook callbacks with URLs
- Following URLs provided in Canvas API responses
- Accessing beta/experimental endpoints
Parameters
- $url : string
-
Full URL or relative path
- $method : string = 'GET'
-
HTTP method (GET, POST, PUT, DELETE, PATCH, etc.)
- $options : array<string|int, mixed> = []
-
Guzzle request options
Tags
Return values
ResponseInterfacerequest()
Make a request
public
request(string $method, string $url[, array<string|int, mixed> $options = [] ]) : ResponseInterface
Parameters
- $method : string
- $url : string
- $options : array<string|int, mixed> = []
Tags
Return values
ResponseInterfacerequestPaginated()
Make a request with pagination support
public
requestPaginated(string $method, string $url[, array<string|int, mixed> $options = [] ]) : PaginatedResponse
Parameters
- $method : string
- $url : string
- $options : array<string|int, mixed> = []