cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Passing spaces to Mailchimp with JSON & Windows

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 17 Dec 2013 11:47:38 +0100 (CET)

On Tue, 17 Dec 2013, Owen Watson wrote:

> I'm trying to pass a JSON call to MailChimp via commandline Windows and not
> having much luck.

I don't think this is much of a curl issue. curl sends what you tell it to
send so you need to figure out what to send...

> I'm using curl --insecure -d {JSON call}
> https://us1.mailchimp.com/list/subscribe In the JSON call it works fine if
> there's no spaces, as you'd expect, but as soon as you introduce spaces,
> even if you replace them by + or %20 it falls over.

You need to read up on their API on how the JSON is supposed to look like. I
think JSON is rarely encoded. Are you possing not using any quotes around the
data, like in your example shows here?

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ:        http://curl.haxx.se/docs/faq.html
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-12-17