This project makes HTTP requests to BoxRec and returns the HTML body.
The main purpose of this project is for other projects to easily make requests and return the HTML.
yarn add -D boxrec-requests
or
npm install -D boxrec-requests
import {BoxrecRequests} from "boxrec-requests";
or
const BoxrecRequests = require("boxrec-requests").BoxrecRequests;
All responses are promises. It is highly suggested that you log into BoxRec before hand like this
const cookieJar = await BoxrecRequests.login(BOXREC_USERNAME, BOXREC_PASSWORD); // returns a cookieJar (your log in cookie)
await BoxrecRequests.getPersonById(cookieJar, 352); // makes next request as a logged in user
BoxRec returns additional data if you're logged in. It's recommended that you log in.
Store the cookie so you can reuse it to lower the amount of log in requests that you make to BoxRec
Needs proper CI/CD with E2E tests and not mocks