SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Plugin Development

Reply
 
Thread Tools Display Modes
Old 03/05/2018, 10:47 AM   #11
Kaperstone
High-roller
 
Kaperstone's Avatar
 
Join Date: May 2011
Location: Russia
Posts: 3,354
Reputation: 822
Default Re: HTTP(S) Requests+JSON Plugin - Make HTTP(S) Requests with JSON

Quote:
Originally Posted by [HLF]Southclaw View Post
Version 0.3.0 just released with a basic WebSocket API.
wss?
__________________
Kaperstone is offline   Reply With Quote
Old 03/05/2018, 11:10 AM   #12
[HLF]Southclaw
High-roller
 
[HLF]Southclaw's Avatar
 
Join Date: Apr 2009
Location: England
Posts: 4,837
Reputation: 1405
Default Re: HTTP(S) Requests+JSON Plugin - Make HTTP(S) Requests with JSON

Quote:
Originally Posted by Kaperstone View Post
wss?
I've not actually tested secure sockets yet, it should work because HTTPS works and it's all from the same library.

Not super sure about Linux though, it claims to require ca-certificates to be installed but upon testing it still failed.
__________________



[HLF]Southclaw is offline   Reply With Quote
Old 05/05/2018, 10:56 AM   #13
Chaprnks
Gangsta
 
Chaprnks's Avatar
 
Join Date: Sep 2007
Location: Soviet America
Posts: 725
Reputation: 53
Default Re: HTTP(S) Requests+JSON Plugin - Make HTTP(S) Requests with JSON

A while back I was trying to connect my script to Bugify API (ended up using JSON & http() POST). I wonder if this would be a better option, as I was using an ancient SAMPSON plugin, which had some bugs when there was nothing to return (no open bugs on the tracker).
__________________
Chaprnks is offline   Reply With Quote
Old 07/05/2018, 10:46 AM   #14
[HLF]Southclaw
High-roller
 
[HLF]Southclaw's Avatar
 
Join Date: Apr 2009
Location: England
Posts: 4,837
Reputation: 1405
Default Re: HTTP(S) Requests+JSON Plugin - Make HTTP(S) Requests with JSON

Quote:
Originally Posted by Chaprnks View Post
A while back I was trying to connect my script to Bugify API (ended up using JSON & http() POST). I wonder if this would be a better option, as I was using an ancient SAMPSON plugin, which had some bugs when there was nothing to return (no open bugs on the tracker).
This is one of the use-cases I had in mind while designing the plugin, be sure to give it a try!

One feature I must implement though is the ability to skip callbacks for POST-and-forget style requests, such as logging. The callback would be a waste of resources if these events were very frequent. That should be in the next release.

Next release will also include JsonAppend for appending new data to objects and arrays.
__________________



[HLF]Southclaw is offline   Reply With Quote
Old 07/05/2018, 02:32 PM   #15
onlyhard
Little Clucker
 
Join Date: Apr 2017
Posts: 1
Reputation: 0
Default Re: HTTP(S) Requests+JSON Plugin - Make HTTP(S) Requests with JSON

Hey. You can build a plug-in Redis for Windows?
(translate)
onlyhard is offline   Reply With Quote
Old 07/05/2018, 02:41 PM   #16
[HLF]Southclaw
High-roller
 
[HLF]Southclaw's Avatar
 
Join Date: Apr 2009
Location: England
Posts: 4,837
Reputation: 1405
Default Re: HTTP(S) Requests+JSON Plugin - Make HTTP(S) Requests with JSON

Quote:
Originally Posted by onlyhard View Post
Hey. You can build a plug-in Redis for Windows?
(translate)
I might do if I get the time. This plugin fills most of the original requirements Redis did though. The only reason you'd need to use Redis in SA:MP would be as a data cache to reduce database calls or requests. It's not advised you use Redis to share data between applications any more, use a JSON RPC mechanism instead with this plugin.
__________________



[HLF]Southclaw is offline   Reply With Quote
Old 08/05/2018, 06:33 PM   #17
FireCat
High-roller
 
FireCat's Avatar
 
Join Date: Jul 2010
Posts: 2,404
Reputation: 596
Default Re: HTTP(S) Requests+JSON Plugin - Make HTTP(S) Requests with JSON

Seems like a very interesting release!

About time someone gave network requests/websocket support, even though there was some basic support towards http requests.

Json objects in pawn , yay!

Congratulations.
FireCat is offline   Reply With Quote
Old 09/05/2018, 06:56 AM   #18
git
Banned
 
Join Date: Apr 2018
Posts: 20
Reputation: 0
Default Re: HTTP(S) Requests+JSON Plugin - Make HTTP(S) Requests with JSON

Useful for this: http://wiki.vg/Authentication -> payload
git is offline   Reply With Quote
Old 09/05/2018, 01:51 PM   #19
AdrianGraber
Big Clucker
 
AdrianGraber's Avatar
 
Join Date: Mar 2013
Location: Germany
Posts: 97
Reputation: 102
Default Re: HTTP(S) Requests+JSON Plugin - Make HTTP(S) Requests with JSON

Quote:
Originally Posted by [HLF]Southclaw View Post
I might do if I get the time. This plugin fills most of the original requirements Redis did though. The only reason you'd need to use Redis in SA:MP would be as a data cache to reduce database calls or requests. It's not advised you use Redis to share data between applications any more, use a JSON RPC mechanism instead with this plugin.
But what to do when you want to recieve them without pinging the server constantly?
AdrianGraber is offline   Reply With Quote
Old 09/05/2018, 06:46 PM   #20
CoaPsyFactor
Gangsta
 
Join Date: Jul 2010
Location: Belgrade, Serbia
Posts: 878
Reputation: 47
Cool Re: HTTP(S) Requests+JSON Plugin - Make HTTP(S) Requests with JSON

Quote:
Originally Posted by Gforcez1337 View Post
This looks like a great way to seperate database (back-end) stuff with the gamemode itself. Looks great!
well - database and back-end are not the same thing.... but yes, easiest way to separate data manipulation from gamemode itself

P.S Awesome plugin dude!!!!
__________________
Quote:
Originally Posted by ThaiLuan View Post
Code:
C:\Users\Administrator\Downloads\Viet-RP\gamemodes\3mien.pwn(112016) : fatal error 101: cannot write to file: "disk full"

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Help me! How to fix error

Last edited by CoaPsyFactor; 09/05/2018 at 06:46 PM. Reason: forgot to say "Awesome plugin!!!"
CoaPsyFactor is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JSON and SAMP HTTP davidbull Scripting Help 0 05/09/2016 06:07 AM
[Plugin] SAMPSON - A JSON plugin for SA-MP KingHual Plugin Development 25 15/08/2016 04:40 PM
[HELP] Vehicles.json don't load Stefand Scripting Help 1 21/02/2012 02:19 PM
HTTP() callback won't fire, + server crash using HTTP() KoczkaHUN Bug Reports 6 14/12/2011 09:35 AM
vehicles.json help plz sherlock Server Support 3 02/01/2011 12:41 PM


All times are GMT. The time now is 02:00 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.