eidheim / Simple-Web-Server

A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.
MIT License
2.61k stars 751 forks source link

Do We have a method like urlencode? #183

Closed hedemonde closed 6 years ago

hedemonde commented 6 years ago

hi: I want to transform something like this: "ImgUrl": another url but android client failed to decode the response. so I need encode the imgurl before it sended. I try to find an encode method, but i can't. Is here has some method to do this thing? thank you !

eidheim commented 6 years ago

I think you are looking for this: https://github.com/eidheim/Simple-Web-Server/blob/master/utility.hpp#L87 or https://github.com/eidheim/Simple-Web-Server/blob/master/utility.hpp#L42. You can also encode/decode using Base64: https://github.com/eidheim/Simple-Web-Server/blob/master/crypto.hpp#L30

hedemonde commented 6 years ago

thank you!