Attributes
Includes Deno configuration
Repository
Current version released
3 years ago
Fetch cli
Use fetch web API from the command line.
Installation
deno install --allow-net -fn fetch https://deno.land/x/fetch_cli/fetch.tsUsage
fetch https://faker.deno.dev?status=201&body=helloWill print http request and response to stdout.
GET https://faker.deno.dev/?status=201&body=hello
accept: */*
accept-language: *
HTTP/1.1 201 Created
access-control-allow-origin: *
content-length: 5
content-type: text/plain;charset=UTF-8
date: Wed, 12 Oct 2022 16:30:20 GMT
server: deno/europe-southwest1-a
vary: Accept-Encoding
hello
Features
Auto detect content type for JSON body
fetch --method POST --body '{"hello":"world"}' https://faker.deno.dev/pongRead body from file
fetch --method POST https://faker.deno.dev/pong < body.json
# or
cat body.json | fetch --method POST https://faker.deno.dev/pongDisplay options
Use --hide-request and --hide-response to hide request or response headers.
Use --hide-body to hide response and request bodies.
Use any Fetch init options
fetch --method POST --body '{"hello":"world"}' --headers 'content-type:application/json' https://faker.deno.dev/pongfetch --redirect=manual https://faker.deno.dev?status=307help
fetch --help