开发者

GET request with space in QueryString crashes code

开发者 https://www.devze.com 2023-01-30 18:09 出处:网络
Simply put my code is working fine and returning JSON from GET requests, but when there is a space in one of the value pairs of the QueryString the Service shuts down. Even when debugging in the IDE n

Simply put my code is working fine and returning JSON from GET requests, but when there is a space in one of the value pairs of the QueryString the Service shuts down. Even when debugging in the IDE no exception is thrown, although, using Fiddler to perform the GET request I开发者_Python百科 get back a "HTTP Error 400 - Bad Request" - probably because the server's just shut down (the Visual Studio development Server).


Spaces aren't a legal part of the querystring, and should be replaced with a + (plus sign)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号