Generalised API

The http api has been cleaned up so that just the type and an optional body can be specified. This has allowed for some very simple macros to be written, directly interfacing with this general purpose function.

PUT, GET, DELETE and POST all have shortcut macros now.