I am trying to execute the following line in command prompt:

curl -X POST -d '{ "method" : "account_info", "params" : [ { "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"} ] }' http://s1.ripple.com:51234

However, I get the following:

curl: (6) Could not resolve host: method
curl: (7) Failed connect to :80; No error
curl: (6) Could not resolve host: account_info,
curl: (6) Could not resolve host: params
curl: (7) Failed connect to :80; No error
curl: (3) [globbing] illegal character in range specification at pos 2
curl: (3) [globbing] unmatched brace at pos 2
curl: (6) Could not resolve host: account
curl: (7) Failed connect to :80; No error
curl: (3) [globbing] unmatched close brace/bracket at pos 35
curl: (3) [globbing] unmatched close brace/bracket at pos 1
curl: (3) [globbing] unmatched close brace/bracket at pos 1
unable to parse request

I am on windows, and the error has to do with quotes, braces, and globbing. I tried escaping quotes by preceding them with a backslash, with no luck.

I am sure I just need to escape the right stuff, in the right way, but am having a hard time doing it. Some help would be highly appreciated.

share|improve this question
up vote 30 down vote accepted

Try this:

curl -X POST -d "{ \"method\" : \"account_info\", \"params\" : [ { \"account\" : \"rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh\"} ] }" http://s1.ripple.com:51234
share|improve this answer
3  
wow that worked; so the trick was not to use single quotes, and escape any double quotes within the string? Thanks man! – kyphos Jul 10 '13 at 1:15
1  
Yes, window's command.exe doesn't seem to support single quotes. PowerShell does, but there are still some Problems when using them, so the best solution is to don't use them at all. – Manuel Görlich Jul 10 '13 at 7:45
1  
@ManuelGörlich, thank you a lot! :) – V. Panchenko Jan 21 '16 at 19:27
    
How could you insert a environment variable in there? Something like { \"account/": $ACCOUNT_KEY } – Walter Martin Vargas-Pena Jan 3 at 17:03

You can use curl -g to turn off globbing:

curl -g -X POST -d '{ "method" : "account_info", "params" : [ { "account" : "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh"} ] }' http://s1.ripple.com:51234

Easier than escaping all those brackets.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.