-
-
Save ecarnevale/999654 to your computer and use it in GitHub Desktop.
Tagging an object on FluidINFO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks to @RobSpectre I discovered an error on my lib due to some confusion while I wrote it: the
opaque
parameter ought to be calledprimitive
…Usually
content_type
is set asapplication/json
, if you want to set a primitive value, you just sayprimitive: true
and thecontent_type
is set asapplication/vnd.fluiddb.value+json
. For opaque values, you just have to set thecontent_type
accordingly.This is fixed with this commit: ecarnevale/jsFluidDB@b08a1a72102d28357bcf7650a26bfb18bd4661d9