Using curl I can do:
curl -X PUT localhost:5984/test/testdoc --data-binary @test.json
{"ok":true,"id":"testdoc","rev":"1-5d251ed7bd4dbf3c458b58b626d57b78"}
the file test.json contains:
{ "test":"foobar" }
and is hence correctly evaluated and created as a document.
However trying to do the same in couchbeam yields:
1> couchbeam:start().
\ Found 0 name clashes in code paths
ok
2> couchbeam_server:start_connection_link().
<0.61.0>
3> couchbeam_server:open_db(default, {test, "test"}).
<0.67.0>
4> {ok, Test} = file:read_file("test.json").
{ok,<<"{ \n\t\"test\":\"foobar\" \n}\n">>}
5> couchbeam_resource:put(default, "127.0.0.1:5984/test/testdoc", [], [], Test, []).
\ exception error: no function clause matching couchbeam_resource:make_auth(default,[])
in function couchbeam_resource:request/7
Using curl I can do: curl -X PUT localhost:5984/test/testdoc --data-binary @test.json {"ok":true,"id":"testdoc","rev":"1-5d251ed7bd4dbf3c458b58b626d57b78"}
the file test.json contains: { "test":"foobar" } and is hence correctly evaluated and created as a document.
However trying to do the same in couchbeam yields: 1> couchbeam:start(). \ Found 0 name clashes in code paths ok 2> couchbeam_server:start_connection_link(). <0.61.0> 3> couchbeam_server:open_db(default, {test, "test"}). <0.67.0> 4> {ok, Test} = file:read_file("test.json").
{ok,<<"{ \n\t\"test\":\"foobar\" \n}\n">>}
5> couchbeam_resource:put(default, "127.0.0.1:5984/test/testdoc", [], [], Test, []). \ exception error: no function clause matching couchbeam_resource:make_auth(default,[]) in function couchbeam_resource:request/7