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.
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
Post a Comment