afHttpExt

Axon functions for making HTTP requests to REST APIs
afHttpExt

Registered users on StackHub may elect to receive email notifications whenever new package versions are released.

v1.0.6

HTTP Ext is an extension for SkySpark v3.0.13+ that provides Axon functions for making HTTP requests and calling REST APIs.

HTTP Ext has explicit functions for making GET, POST, PUT, and DELETE requests over http and https allowing you to modify all aspects of the HTTP request, including headers, body content, and connection settings.

There are even functions for uploading files and posting forms! The rich HTTP response object then allows you to inspect status codes, status messages, headers, and body content.

HTTP Ext is free to download and evaluate but a licence must be purchased for production use. See Licensing for details.

Axon Functions

Axon methods may be categorised in to the following:

Generic Functions

There is one generic, general purpose function for making HTTP requests:

It takes a Dict of (mostly optional) request parameters and returns a Dict of response parameters, and is capable of calling most REST APIs.

Convenience Functions

Convenience functions make simple HTTP requests, optionally taking HTTP request headers and / or a body, and return the HTTP response body as a string. An Err is thrown if the HTTP response code matches 4xx or 5xx.

Because it is often useful to inspect response details, the response Dict (the same as what would have been returned from afHttpSendReq()) is available by calling:

You may call this function after calling any of the convenience functions.

Specialised Functions

The following specialised functions also return the HTTP response body as a string:

Like the convenience functions, you may also call afHttpLastRes() after calling a specialised function to return a Dict of the last HTTP response.

Utility Functions

Other helpful functions:

SSL Handshake Exceptions

Should any of the HTTP functions throw an javax.net.ssl.SSLHandshakeException, then that signifies a problem with the underlying Java platform and not the Axon functions.

Note that SSL is not a type of encryption, it's an ever growing suite of standards and technology. Meaning web clients (in our case Java) has to continually grow to support it all.

Make sure Java supports the required server cipher by inspecting the server's SSL certificate in a browser, or by visiting SSL Labs. Then visit Oracle's Java Security Providers to ensure the cipher is supported. See StackOverflow's Problems connecting to HTTPS/SSL with Java client for details.

Note that strong encryption ciphers are often disabled in Java by default. To enable them, you may need to install Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.

Licensing

HTTP Ext is a Commercial product and requires a licence to be purchased in order to run unhindered.

Licences for HTTP Ext are tied to an SkySpark organisation. This means it is valid for and will work on, any SkySpark installation within your organisation, but will not work on SkySpark installations for other organisations. You will need to enter your SkySpark organisation ID when purchasing, see Where is my SkyArc Organization ID? for details.

Purchased licences are available from the My Licences page and should be downloaded to the /var/lic/ directory of your SkySpark installation.

Minor updates to HTTP Ext may be provided free of charge, but major updates will require a new licence to be purchased.

Although free to download, HTTP Ext enters into an Evaluation Mode if it does not find a valid licence; whereby its Axon functions may only be invoked 50 times.

For support, comments, and refunds, please email [email protected].

Special Mentions

Special thanks go to Jaap Balvers and Pieter van der Mijle of BAM Energy Systems for sponsoring, supporting, and beta testing HTTP Ext.

Version Notes

v1.0.6

  • Bug: Response headers returned a Fantom Map, not an Axon Dict.

v1.0.4

  • New: Created alien ext icon.
  • Bug: Fixed an issue with the extension name.

v1.0.2

  • Chg: Licensing code updated to be compatible with SkySpark v3.0.13.

v1.0.0

  • New: Initial release for BAM Energy Systems.
Published by Fantom Factory

Products & Services by Fantom Factory

Packages by Fantom Factory

Commercial packages

Free packages

Pricing options
HTTP Ext$525.00
Log in to purchase Download evaluation
Package details
Version1.0.6
LicenseCommercial
Build date5 months ago
on 6th Jun 2018 09:35:42 UTC
Depends on
File nameafHttpExt.pod
File size26.28 kB
MD536af56e98d954135e7740b83385334e2
SHA1 d9423345c1f66e3593a7cd63d4ba3c73a4d5b195
Published by
Fantom FactoryDownload now
Also available via SkyArc Install Manager
Tags
Fantom Pod
Sky Arc Ext
Axon Funcs