asp.net - can not sent curly brace and space in the URL using C# -


i trying sent data apache (xampp)server using c#. in access log found curly brace , space not coming. later found curly brace has become %7b , space become %. how solve problem.

expected output=

/vat/?data={site=123}"

current output =

"/vat/?data=%7bsite=%20123%7d"

here code , apache access log picture. enter image description here

 webrequest reqst2 = webrequest.create("http://192.168.1.101/vat/?data={site=123}");  webresponse respons2 = reqst2.getresponse(); 

this comes down encoding issue. try this:

string fixedurl = system.uri.unescapedatastring(yoururlhere);  

hope helps!


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -