Field Manual PHP / Laravel reference
← HTTP / API

HTTP methods

Methods communicate the operation’s intended semantics.

What it is

Methods communicate the operation’s intended semantics.

When to use it

Design predictable interfaces and retries.

Syntax

GET /orders          // read
POST /orders         // create/action
PUT /orders/42       // replace
PATCH /orders/42     // partial update
DELETE /orders/42    // delete

Example

GET /accounts/7
POST /accounts/7/transfers
Content-Type: application/json

{"destination_account_id":8,"amount_cents":1250,"currency":"USD"}

Common mistakes

GET must not trigger state changes; PUT/DELETE idempotence concerns effects, not identical status codes.

Related topics

Browse HTTP / API