Welcome to the Linux Foundation Forum!

Seeing an issue while posting the data to roster app using curl command

curl -H "Content-Type:application/json" -X POST -d '{"firstName": "foo", "lastName": "bar"}' http://roster-bright-sitatunga-gl.cfapps.io/people
curl: (6) Could not resolve host: foo,
curl: (6) Could not resolve host: lastName
curl: (3) [globbing] unmatched close brace/bracket in column 4
{"cause":{"message":"Unexpected character (''' (code 39)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: org.apache.catalina.connector.CoyoteInputStream@1ef2750e; line: 1, column: 2]"},"message":"Could not read document: Unexpected character (''' (code 39)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: org.apache.catalina.connector.CoyoteInputStream@1ef2750e; line: 1, column: 2]; nested exception is com.fasterxml.jackson.core.JsonParseException: Unexpected character (''' (code 39)): expected a valid value (number, String, array, object, 'true', 'false' or 'null')\n at [Source: org.apache.catalina.connector.CoyoteInputStream@1ef2750e; line: 1, column: 2]"}

Best Answers

Categories

Upcoming Training