Skip to content
This repository

Support for changing default content type #91

Closed
ryangreenberg opened this Issue September 06, 2012 · 2 comments

2 participants

Ryan Greenberg Jakub Roztočil
Ryan Greenberg

I like using HTTPie, but it's annoying to type -f every time I send data. JSON is an interesting default since it seems like standard form data is just as common, and sending encoded JSON is more of a deviation from the norm. I'd vote for changing the default, but in either case, having a .httpierc or similar file where you can specify the preferred behavior would let you set a preference and forget it.

Jakub Roztočil
Owner

+1 — I'm planning on making it configurable in the next release.

The reason why JSON is default was an assumption based on my usage pattern that from the command line, it's more common to interact with JSON-based services. But I understand your point of view and tend to agree that form data would've been a more sensible default.

I'm not sure if it's a good idea to make such a big backwards-incompatible change now (although the introduction of a config file would make it easier for people used to JSON being default).

Ryan Greenberg

Great--I'm sure that whichever default makes sense depends primarily on what type of services you interact with most often. In either case, a config file would be a nice addition; I'm glad to hear it's on your radar. Thanks for the quick response.

Jakub Roztočil jkbr closed this issue from a commit September 17, 2012
Jakub Roztočil Added configuration file.
The "default_content_type" option can be set to "form".

Closes #91.
4029dbf
Jakub Roztočil jkbr closed this in 4029dbf September 16, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.