Re: REST in Pawn - HTTP and JSON methodmaps
Quote:
Quote:
|
Re: REST in Pawn - HTTP and JSON methodmaps
Quote:
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. |
Re: REST in Pawn - HTTP and JSON methodmaps
Quote:
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
|
Re: REST in Pawn - HTTP and JSON methodmaps
Quote:
Correct, making an API and a plugin to use it. Hmm yeah i guess this would solve most things. Would be maybe nice to bake it into the extension since its focused around making web calls :) |
Re: REST in Pawn - HTTP and JSON methodmaps
Looks like there's a curl_easy_escape(), so shouldn't be that hard.
|
Re: REST in Pawn - HTTP and JSON methodmaps
Quote:
|
Re: REST in Pawn - HTTP and JSON methodmaps
Sorry for the double post but...
I have a bug and i dont really even know how to describe it in words easily since I cant make a test plugin to replicate it but its definitely not working in the plugin i want it to. Could i add you on steam DJ Tsunami? Thanks |
Re: REST in Pawn - HTTP and JSON methodmaps
Any chance of functions to iterate through objects and arrays?
|
Re: REST in Pawn - HTTP and JSON methodmaps
Quote:
PHP Code:
|
Re: REST in Pawn - HTTP and JSON methodmaps
I intentionally left out object iteration to keep the code simple. Besides, when you're talking to an API you should know which fields are returned. If you're not talking to an API, I believe StringMap should suffice.
Quote:
|
All times are GMT -4. The time now is 00:39. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.