Skip to content


Is there a simple way to set Content-Type #17

zzeroo opened this Issue · 2 comments

2 participants


Now with couchdb < 1.0 you must set the Countent Type, like

-H "Content-Type: application/json" 

Is there a simple way to do that?


Sure. You can set a config file that adds default options on a per host/method basis. Check out the "Per-Host/Per-Method Curl Configuration Files" section of the README file.

(If you just want to know how to pass options to curl then it's easy, you just specify them on the command line, see the README)


Thinking about it a little more, I added the capability to specify curl options when you call the resty command to set the host/uri base. Subsequent requests (GET/POST/etc) will have those options automatically added. This is not on a per-method basis though---the options are added for all methods. To get per-method options you would want to do the config file thing as above. Have a look at the "Default Curl Options" section of the README.

@micha micha closed this
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.