mostlyserious / riak-js

Riak client for Javascript
http://riak-js.org
476 stars 102 forks source link

db.save not saving custom headers #211

Open seggy opened 10 years ago

seggy commented 10 years ago

I'm having trouble setting custom headers on the db.save() method. With curl it works just fine. Am I doing something wrong? I'm using version "riak-js": "0.10.2"

// Request header is not set
db.save("test", 1, "hello", {debug:true, custom:'not storing this value anywhere'});

// Request header is not set
db.save("test", 1, "hello", {debug:true, 'X-Riak-Meta-Custom': 'not storing this value eigther'});

// Header IS set. curl -v -XPOST 'localhost:8098/riak/test/1' \ -H 'Content-Type: text/plain' \ -H 'X-Riak-Meta-Custom: saved_just_fine' -d 'hello'