I have a api url like below in my mvc4 app
http://localhost:15839/api/mydata/getdata/3365895543/PROBLEMDATA/myotherparam
Now client is consuming the above url to send httprequest
. In response api
is sending back a response
. but in PROBLEMDATA
of the url user is sending bad characters that are giving me Bad Request - Invalid URL
. I can't force my client source to encode data. i need to handle it in my web api and give back my client a string "Unsucessful"
. I have seen this webapi cycle wondering at which point I should handle this. probably at http message handler but How?
I may need to follow this. but Register(HttpConfiguration config)
also doesn't get hit