If you are new to web service interfaces, first review HTTP Request Structure for an overview of what makes up an HTTP request.
Tips: When building HTTP requests in the Translator, there are several tips and tricks to know:
Expand |
---|
modularize web service methods into functions in one or more lua files, depending on the scale of methods required.
use Custom Fields for configurations - avoid hardcoding.
url, authentication data (clientID, client secrets, username, password, tokens, etc.)
pass parameters as a table
pcall(), Retry Library, log errors
Prepping the body:
json.serialize
tostring() or S()
urlcode.encodeTable - lua table to query string
SSL certificates in net.http.* - Enable TLS/SSL with the Network Client APIs
...