Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mearns/08d98b17326e7240f598f3443f08003e to your computer and use it in GitHub Desktop.
Save mearns/08d98b17326e7240f598f3443f08003e to your computer and use it in GitHub Desktop.
const http = require('some-well-known-http-request-module');
function init() {
http.config({
baseUrl: 'http://example.com/rest/api/'
});
}
function makeRestApiCall(data) {
return http.post('expectedEndpoint', data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment