degiro-api icon indicating copy to clipboard operation
degiro-api copied to clipboard

Make all fetch requests use requestOptions from single util file.

Open magnific0 opened this issue 4 years ago • 0 comments

WARNING: This touches quite a bit of code, and I didn't run the test set with my account.

The reason for doing this is to control all fetch requestsOptions from a single point. This improves maintainability and legibility of the code. For me personally, I want to be able to control header information like user-agent and referrer.

Functions I did test: login, getAccountConfig, getAccoundData, getPortfolioRequest.

This is my first time coding in TypeScript, so any remarks are welcome!

Cheers!

magnific0 avatar Jan 28 '21 23:01 magnific0