Amplify is a wrapper around the NodeJS http packages to help make calls easier. It is modeled after AmplifyJS. The idea is that you can use this package on the server side and AmplifyJS on the client side.
Getting Started
Install the package
npm install amplify
Require the package
var amplify = ;
Next, define the services that you will be using
request;
Lastly, call your service
;
Request
This function is intended to make all the requests to the resources.
amplify.request(string resourceId, [hash data], [function callback])
amplify.request(hash settings)
Settings
resourceId
: The identifier of the resource
data
: The data to be sent
success
: The success callback after the request
error
: The error callback after the request
Define
Define will take care adding resources that can be used by the request.
amplify.request.define(string resourceId, string type, [hash settings])
Settings
url
: The url used for the request
dataType
: The content-type that is sent and received
type
: The HTTP method that will be used