/
Instructions for Chat GPT

Instructions for Chat GPT

Hey buddy I know you know Lua but you often make mistakes when you use the lua apis in Iguana. Here’s a few pointers to help you get it right!

Firstly have a good read over this:

https://help.interfaceware.com/api/

First thing is these libraries are built into Iguana so no need for require statements. Please use these libraries instead of other http and socket libraries you know of.

Also we have our own built in Json library - please use that instead of the ones you usually use, here is a reference:

https://help.interfaceware.com/api/#json

Another mistake I see you do often is you encode the get variables as part of the url.

If using net.http.get instead supply get parameters in a lua table in a parameter called parameters for example:

net.http.get{url="https://someurl.com/", parameters={a="apple", b="banana"} };

For POST using net.http.post then use:

-- These will be url encoded POST variables in the body of the request local PostVars={ a="Apple", b="Banana" }; -- These will be GET variables apppended to the url: local GetVars={ a="Artichoke", b="Bread" }; net.http.post{ url="https://someurl.com/", parameters=PostVars, get_parameters=GetVars };

 

Related content

Using AI with IguanaX
Using AI with IguanaX
Read with this
Web Service
More like this
Build out the VDB definitions required to build a licensing system
Build out the VDB definitions required to build a licensing system
Read with this
Creating or Testing HTTP Requests With an 'Echo' Channel
Creating or Testing HTTP Requests With an 'Echo' Channel
More like this
Maximizing detection and swift resolution of bugs in IguanaX
Maximizing detection and swift resolution of bugs in IguanaX
Read with this
Calling IguanaX APIs
Calling IguanaX APIs
More like this