Log in or register to post comments

Different results from sample

September 14, 2017 - 7:56am #1


I'm developing an integration for the API using NodeJS, basing the implementation on the PHP samples. I got everything setup and can generate the same signature as in PHP, but when I try to execute the request from NodeJS I only get the result_code Failed, on the PHP samples I get the correct result_code.

Bellow I created the same request I'm doing on NodeJS and PHP using cURL (and I have the same result as the NodeJS application):

curl -X POST \

  https://vws.vuforia.com/targets \

  -H 'authorization: VMS 76020e219f323a190749046e04a08c070b1135e8:eNNfnYntTrpEMd/2C/6Kc2lvU5I=' \

  -H 'content-type: application/json' \

  -H 'date: Thu, 14 Sep 2017 14:19:10 GMT' \

  -d '{"width":320,"name":"testa","image":"iVBORw0KGgoAAAANSUhEUgAAATkAAAE5AQMAAADRL8WyAAAAAXNSR0IArs4c6QAAAAZQTFRFAAAA////pdmf3QAAANZJREFUeNrt2jEKg0AQheERi5QeIUfxaPFoHiVHsEwhvjAyOAsmgRHS/a/axc9yecyqnTNqMxukyXpptk5azAwIBJbhTU1eDj0OjwCBwItwjiUQCPwzjFbrfbUBgcAS9A0QCLwIMw7j4D2kfeYCAoEFWLrQ8ExAILAI9SNr03dAILAIs+Kescl5rD2FQCCwCCXls4RZcREgEFiCkbE9hZH2IzIQCKxDSVlk8V7WX05qQCBwh3kV/7G5IkAgsA4lBbxLhz9fxQOBwBr89v/g4nC1CBAILMM34TG2uvMH+igAAAAASUVORK5CYII=","active_flag":1}'

What I expect from this request is this:


What is wrong with this payload that does not return the same response as in the PHP samples?

Log in or register to post comments