Is it possible to change the data of incoming HTTP request in WCF?
I’ve already found out how to change HTTP method (using IDispatchOperationSelector and HttpRequestMessageProperty of the incoming message).
I’m writing behavior that would enable to make “POST” requests using GET requests (with method and data stored in query string). I can override the HTTP method, but I can’t find the solution to override the data. I need to load the data stored in query string and use them as HTTP body.
Any thoughts?
You’ll need to recreate the incoming message so that the message body contains the information you want to pass. The body will likely be in either XML or JSON format (supported out-of-the-box). The code below shows one example of how this can be done.