Releases: Southclaws/pawn-requests
0.10.0
0.9.0
0.8.7
0.8.6
Fixed a bug that caused callbacks to duplicate when multiple AMX instances were present (such as Filterscripts).
0.8.5
0.8.4
0.8.3
Fixed some minor bugs with garbage collection. Using JsonToggleGC
would be ineffective if JsonGet*
functions were used on a node.
0.8.2
Fixed content type not being set on JSON requests with no body.
RequestJSON
with POST
will now correctly set Content-Type: application/json
even if no JSON body is set.
0.8.1
Fixed return values for missing keys on JsonGet*
functions. Calling JsonGet*
with a key that does not exist will now return a non-zero error code. This release also removes the ERROR:
prints caused by doing this.
0.8.0
Implemented JsonSet*
functions for directly assigning keys to values. This can be used as an alternative to the Json*
object builder API for explicitly setting keys to values of all types. This combined with JsonToggleGC
means JSON objects can be modified across function calls and via callbacks.
Example:
new Node:n = JsonObject();
JsonToggleGC(n, false);
mutateJson(n);
JsonToggleGC(n, true);```
// n now contains key1 and key2
// in another part of code
mutateJson(Node:n) {
JsonSetString(n, "key1", "value1");
JsonSetObject(n, "key2", JsonObject(
"key3", JsonString("value2")
));
}