nushell/docs/commands/post.md
Justin Ma c0a1d18e3d
update #4455, regenerate commands' docs and update make_docs script (#4586)
* feat: update #4455, regenerate commands' docs

* chore: update make_docs script
2022-02-21 11:26:00 -06:00

1014 B

title layout version
post command 0.59.0

Post a body to a URL (HTTP POST operation).

Signature

> post (path) (body) --user --password --content-type --content-length --headers --raw --insecure

Parameters

  • path: the URL to post to
  • body: the contents of the post body
  • --user {any}: the username when authenticating
  • --password {any}: the password when authenticating
  • --content-type {any}: the MIME type of content to post
  • --content-length {any}: the length of the content being posted
  • --headers {any}: custom headers you want to add
  • --raw: return values as a string instead of a table
  • --insecure: allow insecure server connections when using SSL

Examples

Post content to url.com

> post url.com 'body'

Post content to url.com, with username and password

> post -u myuser -p mypass url.com 'body'

Post content to url.com, with custom header

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