nushell/docs/commands/fetch.md
Joseph T. Lyons 4f367a59de
Strip trailing whitespace in files (#4575)
* Strip trailing whitespace in rs files

* Strip trailing whitespace in toml files

* Strip trailing whitespace in md files

* Strip trailing whitespace in nu files
2022-02-21 08:38:15 -05:00

804 B

title layout version
fetch command 0.59.0

Fetch the contents from a URL (HTTP GET operation).

Signature

> fetch (URL) --user --password --timeout --headers --raw

Parameters

  • URL: the URL to fetch the contents from
  • --user {any}: the username when authenticating
  • --password {any}: the password when authenticating
  • --timeout {int}: timeout period in seconds
  • --headers {any}: custom headers you want to add
  • --raw: fetch contents as text rather than a table

Examples

Fetch content from url.com

> fetch url.com

Fetch content from url.com, with username and password

> fetch -u myuser -p mypass url.com

Fetch content from url.com, with custom header

> fetch -H [my-header-key my-header-value] url.com