Created
June 20, 2017 02:59
-
-
Save mattalhonte/e126b50024f0735f3f3e239d5b354dd9 to your computer and use it in GitHub Desktop.
This file contains 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
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \ | |
> > "$class": "org.example.mynetwork.Commodity", \ | |
> > "tradingSymbol": "54234", \ | |
> > "description": "324234", \ | |
> > "mainExchange": "string", \ | |
> > "quantity": 523434, \ | |
> > "maxVolts": 435324, \ | |
> > "owner": "234324" \ | |
> > }' 'http://composer.tanktwo.cloud:3000/api/Commodity' | |
{"error":{"statusCode":400,"name":"SyntaxError","message":"Unexpected token \\ in JSON at position 2","body":"{ \\\n> \"$class\": \"org.example.mynetwork.Commodity\", \\\n> \"tradingSymbol\": \"54234\", \\\n> \"description\": \"324234\", \\\n> \"mainExchange\": \"string\", \\\n> \"quantity\": 523434, \\\n> \"maxVolts\": 435324, \\\n> \"owner\": \"234324\" \\\n> }","status":400,"stack":"SyntaxError: Unexpected token \\ in JSON at position 2\n at Object.parse (native)\n at parse (/home/ubuntu/fabric-app/my-app/node_modules/body-parser/lib/types/json.js:88:17)\n at /home/ubuntu/fabric-app/my-app/node_modules/body-parser/lib/read.js:116:18\n at invokeCallback (/home/ubuntu/fabric-app/my-app/node_modules/raw-body/index.js:262:16)\n at done (/home/ubuntu/fabric-app/my-app/node_modules/raw-body/index.js:251:7)\n at IncomingMessage.onEnd (/home/ubuntu/fabric-app/my-app/node_modules/raw-body/index.js:307:7)\n at emitNone (events.js:86:13)\n at IncomingMessage.emit (events.js:185:7)\n at endReadableNT (_stream_readable.js:974:12)\n at _combinedTickCallback (internal/process/next_tick.js:80:11)\n at process._tickCallback (internal/process/next_tick.js:104:9)"}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment