Skip to content

Commit b12c193

Browse files
committed
update http request options
1 parent 5bb8ead commit b12c193

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/api/image.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ Note that you can pass a wide variety of image sources to the `loadImage` helper
202202
When loading a URL over HTTP(S) you may also include a second argument containing options to be used when the library makes its web request behind the scenes.
203203

204204
The supported options include:
205-
- `method`: the http ‘verb’ to use (defaults to `GET`)
205+
- `method`: the http ‘verb’ to use (defaults to `"GET"`)
206206
- `headers`: an object mapping request header names to values
207207
- `body`: a string or buffer to be sent to the server if the method is set to `POST` or `PUT`
208-
- `auth`: credentials for Basic Auth in the format `"user:password"` which will be used to construct the `Authorization` header (if not supplied)
208+
- `auth`: a string with credentials for Basic Auth in the format `"user:password"` which will be used to construct the `Authorization` header (if not supplied)
209209
- `signal`: an [AbortSignal][AbortSignal] to allow the request to be cancelled
210210
- `agent`: an [http.Agent][http_agent] used to customize the connection or `false` to disable the [default agent](https://www.npmjs.com/package/https-proxy-agent) which uses the url in the `HTTP_PROXY` environment variable (if defined) as a proxy server
211211
- any other option supported by Node’s [http.request][http_request] call

0 commit comments

Comments
 (0)