hack4impact-calpoly / general-vms

General volunteer management system.
2 stars 0 forks source link

[Frontend] Create utility service or HOC for handling HTTP Requests #25

Closed bglossner closed 2 years ago

bglossner commented 2 years ago

This task is somewhat of a design task. The goal here is to create a utility class or something of the sort that will generalize dealing with HTTP requests and responses to make it easier on anyone who needs to make them.

Here's an example of one I made from Happy Hats: https://github.com/hack4impact-calpoly/happy-hats/blob/173baba2ae7f17eb92ad839cf7fef506d7d6b378/frontend/src/utility/request-helpers.js

Some of the code I have in there is decent and other stuff is not so much. For now, you don't need to worry about authorization headers and stuff. You can take it out or leave it in there... up to you.