GithubHelp home page GithubHelp logo

httpie / httpcat Goto Github PK

View Code? Open in Web Editor NEW
220.0 11.0 29.0 26 KB

httpcat is a simple utility for constructing raw HTTP requests on the command line.

Home Page: https://httpie.io

License: Other

Python 100.00%
cli http command-line terminal debugging python utility api httpie api-testing

httpcat's Issues

why Content-Length value differ from 5 to 6 on README?

httpcat/README.md

Lines 58 to 88 in cc2a30e

## Usage
Interactively create a request and send it with `nc`:
```bash
$ httpcat -v | nc httpbin.org 80
POST /post HTTP/1.1
> POST /post HTTP/1.1\r\n
Host: httpbin.org
> Host: httpbin.org\r\n
Content-Length: 6
> Content-Length: 6\r\n
> \r\n
Hello
> Hello
```
Specify the whole request in the arguments. Here `''` represents an empty
line which will be converted to `\r\n\` separating the headers and the
body. Note also that the omitted `HTTP-Version` is auto-completed:
```bash
$ httpcat -v 'POST /post' 'Host: httpbin.org' 'Content-Length: 5' '' 'Hello' | nc httpbin.org 80
> POST /post HTTP/1.1\r\n
> Host: httpbin.org\r\n
> Content-Length: 5\r\n
> \r\n
> Hello
```

Feature request: Dynamic `Content-Type` header option

How about an option to do the automatic Content-Type header calculation based on the body size? It could be an argument to httpcat to enable this header override.
I often find myself editing the body content quickly and request fails due to wrong Content-Type value.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.