Skip to content

Commit

Permalink
docs: global url may contain path but opts cannot
Browse files Browse the repository at this point in the history
  • Loading branch information
ronag committed Jan 13, 2021
1 parent 6118d49 commit 5c71e4e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,8 @@ The agent must only **implement** the `Agent` API; not necessary extend from it.
* url `string | URL | object`
* opts `{ agent: Agent } & client.request.opts`
`url` may contain path. `opts` may not contain path.
Calls `pool.request(opts)` on the pool returned from either the globalAgent (see [setGlobalAgent](#undicisetglobalagentagent)) or the agent passed to the `opts` argument.
Returns a promise with the result of the `request` method.
Expand All @@ -681,6 +683,8 @@ Returns a promise with the result of the `request` method.
* opts `{ agent: Agent } & client.stream.opts`
* factory `client.stream.factory`
`url` may contain path. `opts` may not contain path.
See [client.stream](#clientstreamopts-factorydata-callbackerr-promisevoid) for details on the `opts` and `factory` arguments.
Calls `pool.stream(opts, factory)` on the pool returned from either the globalAgent (see [setGlobalAgent](#undicisetglobalagentagent)) or the agent passed to the `opts` argument.
Expand All @@ -693,6 +697,8 @@ Result is returned in the factory function. See [client.stream](#clientstreamopt
* opts `{ agent: Agent } & client.pipeline.opts`
* handler `client.pipeline.handler`
`url` may contain path. `opts` may not contain path.
See [client.pipeline](#clientpipelineopts-handlerdata-duplex) for details on the `opts` and `handler` arguments.
Calls `pool.pipeline(opts, factory)` on the pool returned from either the globalAgent (see [setGlobalAgent](#undicisetglobalagentagent)) or the agent passed to the `opts` argument.
Expand All @@ -704,11 +710,15 @@ See [client.pipeline](#clientpipelineopts-handlerdata-duplex) for more details.
* url `string | URL | object`
* opts `{ agent: Agent } & client.upgrade.opts`
`url` may contain path. `opts` may not contain path.
### `client.connect(opts[, callback(err, data)]): Promise|Void`
* url `string | URL | object`
* opts `{ agent: Agent } & client.connect.opts`
`url` may contain path. `opts` may not contain path.
## Specification Compliance
This section documents parts of the HTTP/1.1 specification which Undici does
Expand Down

0 comments on commit 5c71e4e

Please sign in to comment.