jhurliman / node-echoprint-server

A node.js implementation of the Echoprint music identification server
74 stars 37 forks source link

Ingesting a new fingerprint using curl #11

Open Lior79 opened 10 years ago

Lior79 commented 10 years ago

Hi, I have created a json file using echoprint-codegen. I can't figure out how to use this json file to ingest it to the DB. I tried: curl -H "Content-Type: application/json" --data @lethergo.json http://localhost:37760/ingest

I get an error: {"error":"Missing \"code\" field"} though the json file has a code field.

Please advise.

SamDecrock commented 10 years ago

you should not use the json directly but extract the necessary fields yourself. Include the 'code' field like the error states ;-)

Lior79 commented 10 years ago

Sam, can you please show a code example how to do it?

SamDecrock commented 10 years ago

I think the easiest way is to go to http://localhost:37760/debug and paste it inside the box and hit 'ingest' ;-)

picozone commented 7 years ago

Did you succeeded to use the curl command line ?