mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-21 15:40:58 +00:00
1 line
4.3 KiB
JSON
1 line
4.3 KiB
JSON
[{"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1309572161.653019, "message": "I started writing a couchdb module but I got stuck because I couldn't find out how to set the body with http:post and http:put http://docs.kynetx.com/docs/HTTP#post", "group_id": 236, "id": 1546598}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1309572291.0820899, "message": "so I set the Content-type to application/json in the headers and set params to {} but the couchdb server returns : \nerror: \"bad_request\"\nreason: \"invalid UTF-8 JSON: <<>>\"", "group_id": 236, "id": 1546601}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1309572177.8135891, "message": "Could someone give me an example? I want to post a json object", "group_id": 236, "id": 1546599}, {"user_id": 2309, "stars": [], "topic_id": 41000, "date_created": 1310408122.98493, "message": "I want to do the same thing.", "group_id": 236, "id": 1614043}, {"user_id": 763, "stars": [], "topic_id": 41000, "date_created": 1310408391.7402151, "message": "set content-type and body, not params.", "group_id": 236, "id": 1614082}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1313442582.6841919, "message": "and example in the docs with \"body\" would help", "group_id": 236, "id": 1878606}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1313442316.315527, "message": "var doc = '{\"error\":\"bad_request\",\"reason\":\"invalid UTF-8 JSON: <<\\\"body=%7B%22key1%22%3A%22value1%22%7D&headers=HASH%280xc316b98%29\\\">>\"}\\n';", "group_id": 236, "id": 1878567}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1313442237.8643789, "message": "I am trying this", "group_id": 236, "id": 1878560}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1313442248.787879, "message": "mydoc = {\"key1\":\"value1\"};\n body_n_headers= {\"headers\" : { \"Content-Type\" : \"application/json\"} , \"body\" :mydoc.encode() } ;\n doc = http:post(couchdb_protocol+\"://\"+couchdb_host+':'+couchdb_port+'/'+couchdb_db+'/',body_n_headers).pick('$.content');\n doc", "group_id": 236, "id": 1878563}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1313442312.767705, "message": "when I log the doc var in the console I get:", "group_id": 236, "id": 1878566}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1313442593.4121301, "message": "@craigburton did you have more luck?", "group_id": 236, "id": 1878607}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1313442402.3733871, "message": "it seems the body is not created correctly", "group_id": 236, "id": 1878582}, {"user_id": 763, "stars": [], "topic_id": 41000, "date_created": 1313444855.137743, "message": "I'm working on an example...", "group_id": 236, "id": 1878790}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1313447615.324106, "message": "Good to know it is just a bug", "group_id": 236, "id": 1879025}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1313445055.6734171, "message": "great", "group_id": 236, "id": 1878805}, {"user_id": 763, "stars": [], "topic_id": 41000, "date_created": 1313445491.397043, "message": "http:post() has a bug when passing a body instead of arguments.", "group_id": 236, "id": 1878856}, {"user_id": 763, "stars": [], "topic_id": 41000, "date_created": 1313445514.8840749, "message": "clarification: used as a function it has a bug. Used as an action it will work as expected.", "group_id": 236, "id": 1878861}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1313447855.2504809, "message": "Maybe put function has the same bug too", "group_id": 236, "id": 1879044}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1315056688.8698449, "message": "however there are some problems with http authentication", "group_id": 236, "id": 2036546}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1315058033.0388911, "message": "more info here : https://convore.com/kynetx/http-authentication-problem/", "group_id": 236, "id": 2036693}, {"user_id": 30494, "stars": [], "topic_id": 41000, "date_created": 1315056636.7166791, "message": "the bug on http:post() has been ( silently) corrected . thanks", "group_id": 236, "id": 2036543}] |