73
Views
3
Comments
Solved
Is there an ODC equivalent to the OS11 HTTPRequestHandler.GetRequestContent?
Question

I am trying to get the request content in ODC when processing a request to an exposed REST API.  There is logic specific to the method so I don't want to just use the Request info within OnRequest.

In OS11 I can use HTTPRequestHandler.GetRequestContent but I can't seem to find an equivalent in ODC.  Header info can be obtained from HTTP.Request_GetHeader but there isn't an option to get the request content. 

UserImage.jpg
Jeff Barsness
Solution

I just updated the input variable to be Text instead of the expected structure and I can log that string which works.  I can then Deserialize that string into the expected structure and handle any errors accordingly. 

2019-01-07 16-04-16
Siya
 
MVP
UserImage.jpg
Jeff Barsness

HTTP is what I referenced in the initial question where I can get the header but not the body.  

I can do a workaround where I serialize the input variable structure and log that string which would work fine if the request that was sent matches the expected structure hierarchy.   However, I was hoping to get the actual request body text directly so it can be logged and used for debugging if something is sent incorrectly.  

UserImage.jpg
Jeff Barsness
Solution

I just updated the input variable to be Text instead of the expected structure and I can log that string which works.  I can then Deserialize that string into the expected structure and handle any errors accordingly. 

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.