incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Alfke <j...@couchbase.com>
Subject Re: CouchDB: @ in username messing up curl
Date Thu, 14 Nov 2013 04:55:51 GMT
On Nov 13, 2013, at 6:03 PM, Hank Knight <hknight555@gmail.com> wrote:

> What is wrong with this?
> 
> curl -kX -u nlbdmobz@sharklasers.com:password123 POST \
> https://zqzqzqz555.couchappy.com/urls \
> -d "{}" -H "Content-Type: application/json"
> 
> I get an error:
> curl: (6) Couldn't resolve host 'sharklasers.com:password123'

Sorry, I was confused by the cryptic command line at first and thought you were trying to
embed credentials in a URL.

Your real problem has nothing to do with the ‘@‘ sign. You’ve stuck the username argument
in between the -X flag and the method name that’s supposed to follow it. If you just move
the -X and POST next to each other, it works fine:

$ curl -k -u nlbdmobz@sharklasers.com:password123 -X POST https://zqzqzqz555.couchappy.com/urls
-d "{}" -H "Content-Type: application/json"
{"ok":true,"id":"2bac0dff04ebbfcbecb1d491e9000dda","rev":"1-967a00dff5e02add41819138abb3284d”}

—Jens



Mime
View raw message