Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
zzeroo opened this issue Mar 20, 2011 · 2 comments
Closed

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

zzeroo opened this issue Mar 20, 2011 · 2 comments

Comments

@zzeroo
Copy link

zzeroo commented Mar 20, 2011

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?

@micha
Copy link
Owner

micha commented Mar 20, 2011

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)

@micha
Copy link
Owner

micha commented Mar 20, 2011

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 as completed Mar 21, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants