Hi,
When working with a REST web service I was wondering if it's possible to Map the HTTP Response body in addition to mapping the JSON response. The web service I'm using provides a different JSON response when an error occurs.
Standard Response (HTTP Response code 200):
{
"id": 123,
"key": "FOO-456",
"self:" "http://some-url"
}
When an error occurs (HTTP Response Code 400):
{
"errorMessages": [],
"errors": {
"fieldA": "The feildA specified is not a user.",
"fieldB": "fieldB is required"
}
}
I am using the latest build of Stambia so I'm able to map the HTTP Response Code and Message. I would like to also log the response body for debugging purposes. I know that I could use the the parameter "received messages folder" and possible get the content that way but it seems like the wrong approach. Is there a recommended way for handling this?
My target RDBMS table structure would look something like:
ID varchar,
KEY: varchar,
HTTP_RESPONSE_CODE: int,
HTTP_RESPONSE_MESSAGE: varchar,
HTTP_RESPONSE_BODY: text