Change the Content Type in Header From aplication/hal+json to aplication/json

0
Hello, I am working on an import of JSON files by using the REST services, I am using the GET method and getting the following error:ErrorType : com.fasterxml.jackson.core.JsonParseException, Message : Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')at [Source: (org.apache.http.conn.EofSensorInputStream); line: 1, column: 2] Stacktrace : Error parsing JSON. Unexpected character ('<' (code 60)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')at [Source: (org.apache.http.conn.EofSensorInputStream); line: 1, column: 2]The response status code : 200 The server accepts the header application/hal+json, I edited the Content-Type header and still it shows the same error. Does anyone have an idea how to fix this? 
asked
2 answers
0

if you get '<' character error messages, you probably formatted the message as XML

answered
0

Hello Muhanad,

The response you are getting is from a OPENAPI index html page. so it looks like you are not calling the API url but the rooturl and getting the documentation page. You can open that page in your browser and find out the missing url path and add this in your Get call

answered