View Single Post
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 07-27-2017 , 15:29   Re: REST in Pawn - HTTP and JSON methodmaps
Reply With Quote #13

Quote:
Originally Posted by jdlovins View Post
Awesome. Something that would be very useful is a URL encode function. For example if you call an API with parameters such as

/items?type=5&name=i have spaces

it will error out on the API end because of the spaces. Not sure how easy that is to solve really.
"/items?type=5&name=i+have+spaces"

As this thing seems to be aimed at developers making their own things, I assume you're developing your own stuff that uses this thing, which means you could (remember code attribution!) "copy" this one:

From Dynamic MOTD by @psychonic:

UrlEncodeString
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].

Last edited by DarkDeviL; 07-27-2017 at 15:30.
DarkDeviL is offline