Skip to content

Commit

Permalink
Merge pull request #90 from Shopify/thecodepixi/correct_rest_args_table
Browse files Browse the repository at this point in the history
Update rest.md arguments table to be current.
  • Loading branch information
thecodepixi authored Aug 9, 2021
2 parents 79b4784 + e623c95 commit a93ba91
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/usage/rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ REST Admin API endpoints are organized by [resource](https://shopify.dev/docs/ad

REST uses `get`, `post`, `put`, and `delete` requests to retrieve, create, update, and delete resources respectively.

| Parameter | Type | Required? | Default Value | Notes |
|:----------|:----------------|:---------:|:-------------:|:-------------------------------------------------|
| path | string | Yes | | The URL path to request |
| headers | array | No | [] | Any extra headers to send along with the request |
| tries | int | No | null | How many times to attempt the request |
| query | array | No | [] | Query parameters as an associative array |
| body | string or array | Yes | | Only `Post`, and `put` methods can have body |
| dataType | No | Yes | | Only `Post`, and `put` methods can have body |
| Parameter | Type | Required? | Default Value | Notes |
|:----------|:----------------|:---------:|:----------------:|:-------------------------------------------------|
| path | string | Yes | | The URL path to request |
| body | string or array | No | null | Only `Post`, and `put` methods can have body |
| headers | array | No | [] | Any extra headers to send along with the request |
| query | array | No | [] | Query parameters as an associative array |
| tries | int | No | null | How many times to attempt the request |
| dataType | No | No | `DATA_TYPE_JSON` | Only `Post`, and `put` methods can have body |

In the following example we will retrieve a list of products from a shop using `Shopify\Clients\Rest` class.

Expand Down

0 comments on commit a93ba91

Please sign in to comment.