I am trying to use Fiddler to do an HTTP GET to my ASP.NET Web API Odata endpoint service. The URL contains OData commands to filter the results. I can use a browser or the Google extension 'Postman' and run the query and it works.
However, immediately upon placing the URL in Fiddler's 'Composer' tab it turns red. Upon executing the GET I get the following error:
HTTP Error 400. The request is badly formed
It's a bit of a red herring though as I think Fiddler had a problem with composing and sending the proper request that resulted in the response. Here is the URL with OData commands:
http://localhost/MyApp/odata/People()?$filter=Name eq 'John'
As mentioned, this query works in other tools, just not in Fiddler. As I am not a Fiddler expert and did not intuitively see and options to allow this or find any documentation, can anyone tell me if it's possible to compose and send this type of GET with OData commands using Fiddler?
Maybe Fiddler isn't automatically encoding spaces, like other tools might be? Try:
http://localhost/MyApp/odata/People()?$filter=Name%20eq%20'John'
You might also try encoding the single quotes around the string value.
Another thought is that Fiddler has some known issues with using "localhost", which I usually work around by putting a dot ('.
') after localhost
in the request URI:
http://localhost./MyApp/odata/People()?$filter=Name%20eq%20'John'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With