Support for changing default content type #91

ryangreenberg opened this Issue Sep 7, 2012 · 2 comments


None yet

2 participants


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.

jkbrzt commented Sep 7, 2012

+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).


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.

@jkbrzt jkbrzt added a commit that closed this issue Sep 17, 2012
@jkbrzt Added configuration file.
The "default_content_type" option can be set to "form".

Closes #91.
@jkbrzt jkbrzt closed this in 4029dbf Sep 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment