开发者

C++ code for URL-encoding but cannot use curl

开发者 https://www.devze.com 2023-04-04 13:19 出处:网络
Is there a simple way to do URL encode in C++? I am using byte string encode and it give wrong result

Is there a simple way to do URL encode in C++?

I am using byte string encode and it give wrong result

SDKXML=<CSPInput><serviceID>CSOTR39099</serviceI开发者_JAVA百科D>&lt

<CSPInput> Instead of the correct format %3CCSPInput%3E

Will somthing like libcurl work for C++

Sample Request wrongly encoded:

GET /sdk/servlet/abc.servlet.SampleCredit?SDKXML=&lt;CSPInput&gt;&lt;serviceID&gt;CSOTR39099&lt;/serviceID&gt;&lt

<CSPInput> Instead of the correct format %3CCSPInput%3E

Could you please help and suggest where is the issue and propose the code to fix it.


you can look at houdini

&lt seems to be html encode, not url encoding

0

精彩评论

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

关注公众号