@studyportals/sp-hs-misc
Version:
Miscellaneous code used in HouseStark's projects
37 lines • 1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseSuperAgentRequestFactory = void 0;
const superagent = require("superagent");
/**
* A basic implementation of the ISuperAgentRequestFactory interface.
*
* @deprecated Use @studyportals/mb-platform-http-requests
*/
class BaseSuperAgentRequestFactory {
/**
* Creates a GET request to the specified path.
*/
get(path) {
return superagent.get(path);
}
/**
* Creates a POST request to the specified path.
*/
post(path) {
return superagent.post(path);
}
/**
* Creates a PUT request to the specified path.
*/
put(path) {
return superagent.put(path);
}
/**
* Creates a DELETE request to the specified path.
*/
delete(path) {
return superagent.delete(path);
}
}
exports.BaseSuperAgentRequestFactory = BaseSuperAgentRequestFactory;
//# sourceMappingURL=base-super-agent-request-factory.class.js.map