We just released a new Lua API for sending HTTP requests! It is much more powerful and will allow you to use a wider variety of web services. Here are some details on how it is better than our previous API:
Unrestricted HTTP Methods & Content Types
You are no longer limited to a whitelist of request methods (GET, POST) and encodings (JSON, XML, form, plain text). You can now use all HTTP methods and data types.
Full Response Data
Before you could only get the response body. Now you can get all response data, including status code and response headers.
Extensible API
We had trouble adding options to the previous API because of how it was structured. I designed this new API from the ground up to ensure that it would be flexible enough to support all future additions.
I have, as far as I know it does not answer my question. I understand fully well it returns status code and other status information, but I’m just asking for confirmation that it really never does throw a Lua error for any kind of reason (apart from input parameters being incorrectly typed).
It doesn’t specify so on the developer hub and it would make it different from all other --Async methods, which is why I’m asking to be sure.
It can still error if your parameters are invalid (e.g. invalid method, unsupported header key, etc.) or if network error occurs - basically when there’s no valid StatusCode to return. So you have to pcall it.
Oops it looks like the documentation that’s live isn’t the latest draft – I’ll make sure to get it updated. The answer is yes, the method will throw if a response isn’t successfully received.
That was a bug. We cannot allow you to send requests to roblox.com until we figure some things out to prevent possible abuse vectors. Long term we want to enable this so you can use all of our APIs, not the just ones we expose to our Lua API.