Skip to content

Instantly share code, notes, and snippets.

@ecarnevale
Forked from RobSpectre/gist:999620
Created May 31, 2011 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecarnevale/999654 to your computer and use it in GitHub Desktop.
Save ecarnevale/999654 to your computer and use it in GitHub Desktop.
Tagging an object on FluidINFO
fluidDB.put({
url: 'about/' + encodeURIComponent(sender.tab.url) + '/jeterfilter/contains-jeter',
payload: Math.round(((new Date()).getTime()-Date.UTC(1970,0,1))/1000),
async: false,
primitive: true,
username: fluidDBUsername,
password: fluidDBPassword,
success: function(json) {
console.log('URI tagged as containing Jeter.');
}
});
@ecarnevale
Copy link
Author

Thanks to @RobSpectre I discovered an error on my lib due to some confusion while I wrote it: the opaque parameter ought to be called primitive
Usually content_type is set as application/json, if you want to set a primitive value, you just say primitive: true and the content_type is set as application/vnd.fluiddb.value+json . For opaque values, you just have to set the content_type accordingly.
This is fixed with this commit: ecarnevale/jsFluidDB@b08a1a72102d28357bcf7650a26bfb18bd4661d9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment