mrutid/PopBox — Issue #11: Push sample
Author: javiersigler
Created: 2012-03-07 22:23:40+00:00
State: open

What I am doing wrong?

$ curl --header "Content-Type:application/json" -d "{\"payload\": \"{\\"spanish\\": \\"hola\\", \\"english\\": \\"hello\\", \\"to\\":\\"Mr Lopez\\"}\",\"priority\":\"H\",\"callback\":\"http://foo.bar\",\"qeue\":[{\"id\":\"Ax\"},{\"id\":\"Bx\"}],\"expirationDelay\": 360}" -v http://metis.hi.inet:3000

curl: (3) [globbing] illegal character in range specification at pos 61
* About to connect() to metis.hi.inet port 3000 (#0)
* Trying 10.95.101.225...
* connected
* Connected to metis.hi.inet (10.95.101.225) port 3000 (#0)
> POST / HTTP/1.1
> User-Agent: curl/7.24.0 (i686-pc-cygwin) libcurl/7.24.0 OpenSSL/0.9.8t zlib/1.2.5 libidn/1.22 libssh2/1.3.0
> Host: metis.hi.inet:3000
> Accept: */*
> Content-Type:application/json
> Content-Length: 61
>
* upload completely sent off: 61 out of 61 bytes
< HTTP/1.1 400 Bad Request
< Content-Type: text/plain
< Content-Length: 355
< Connection: keep-alive
<
SyntaxError: Unexpected token s
at Object.parse (native)
at IncomingMessage. (/home/tac/mrutid-PopBox-7f952cb/src/node_modules/connect/lib/middleware/json.js:48:25)
at IncomingMessage.emit (events.js:64:17)
at HTTPParser.onMessageComplete (http.js:137:23)
at Socket.ondata (http.js:1374:22)
* Connection #0 to host metis.hi.inet left intact
at TCP.onread (net.js:348:27)* Closing connection #0

Could you please give me an idea of what I am doing wrong?