couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Newson <robert.new...@gmail.com>
Subject Re: problems updating a document
Date Thu, 27 Jan 2011 16:54:29 GMT
Your get is failing and you're attempting to upload a curl error
message to _bulk_docs, which fails (for good reason).

You want -X GET ;)

B.

On Thu, Jan 27, 2011 at 4:25 PM, Fabio Batalha Cunha dos Santos
<fabio.batalha@scielo.org> wrote:
> Hello All,
>
> I'm trying to update a document but I always receive a
> {"error":"bad_request","reason":"invalid UTF-8 JSON"}, even with a document
> that I just pulled. Anybody have any idea what is happening?
>
> I know that old vesions of couchdb send this message for other kind of
> errors. But I'm using the version 1.0.1
>
>
>
> GETTING A DOCUMENT.
> tmp$ curl GET
> http://teste.webservices.scielo.org/scieloorg/ffffa7f8-8793-4476-b3c8-4eb1eff1c074>
> register_new.json
> curl: (6) Couldn't resolve host 'GET'
>  % Total    % Received % Xferd  Average Speed   Time    Time     Time
> Current
>                                 Dload  Upload   Total   Spent    Left
> Speed
> 100  4439  100  4439    0     0   4730      0 --:--:-- --:--:-- --:--:--
> 52223
>
>
> EDITING JSON to put {"docs": [...]}
> tmp$ vi register_new.json
>
> POSTING THE DOCUMENT
> tmp$ curl -d register_new.json -H "Content-Type: application/json" -X POST
> http://teste.webservices.scielo.org/scieloorg/_bulk_docs
> {"error":"bad_request","reason":"invalid UTF-8 JSON"}
>
>
>
>
> Thanks in advance.
> *Fabio Batalha C. Santos*
> Colegiado SciELO
> www.scielo.org
> FAPESP - CNPq - BIREME - FapUNIFESP
>

Mime
View raw message