Error while POST obs message

I am getting an error when I am sending REST query from mirth’s “httpSender” but when I am using the same message in “test” module of openMRS then it is getting accepted. The error is

URL: http://localhost:8083/openmrs-standalone/ws/rest/v1/obs



"person" : "610b0696-7529-4b4a-b65b-37336a75962a",
"obsDatetime": "2017-07-24T15:33:49+05:30",
"encounter": "3bc0672d-ebc6-4e65-aae1-8a1d4de759bf",
"value" : "90"


See my answer on your other post: POST of encounter REST

I found out that for sending REST request one “needs” to send a request header of Authorization:Basic = username:password or one has to set a cookie of sessionId. Eg- URL: http://localhost:8083/openmrs-standalone/ws/rest/v1/visit METHOD: POST

[HEADERS] Set-Cookie: jsessionid=C17C12C50D5C194E2487982F08C4BAEB Authorization:Basic: YWRtaW46QWRtaW4xMjM=


[CONTENT] { “patient”:“c342807d-fc65-4de1-983e-424c4add487d”, “visitType”:“7b0f5697-27e3-40c4-8bae-f4049abfb4ed”, “location”:“bf38803c-b24c-4d54-bd8d-15fe17a79d0d” }