New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

curlf

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

curlf

File based, persistent and aesthetically pleasing HTTP requests! Just like curl, but with file templates

latest
Source
npmnpm
Version
1.0.0-alpha.4
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

Curlf

File based, persistent and aesthetically pleasing HTTP requests! Just like curl, but with file templates.

Usage

npx curlf ./request.curlf

Or from stdin:

npx curlf --stdin <<EOF
GET http://some.url
EOF

.curlf file format

[[<version>] <method>] <url>
[<headerKey>: <headerValue>]*

[<body>]

NOTE! At least one empty line must exist between headers block and body.

Environment variables can be used anywhere within the file!

<version>

Allowed values:

  • HTTP/1.0
  • HTTP/1, HTTP/1.1
  • HTTP/2, HTTP/2.0
  • HTTP/3

<method>

Allowed values:

  • GET
  • POST
  • PUT
  • PATCH
  • DELETE
  • HEAD
  • OPTIONS

<url>

You know, a full url

Logging

The following flags can be used to specify the logging level:

  • verbose, v

It can also be set through env variable CURLF_LOGLEVEL, which can take any of the following values:

  • VERBOSE, SILLY, 4: Log detailed response (like request headers, request body and response headers)
  • DEFAULT, INFO, 3: Log basic response (url, status, response content)
  • QUIET, 2: Log response content only
  • ERROR, 1: Log errors only
  • SILENT, 0: Log nothing ¯\_(ツ)_/¯

Run travis script on bash

yq read .travis.yml 'script[*]' | bash

Todo

  • Support for further curl flags
  • Custom renderers/formatters

Keywords

curl

FAQs

Package last updated on 20 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts