You can copy the code below and paste it in a file in your project. We decided not to create a package for this since it's a simple wrapper around fetch and this allows us to quickly launch new updates.
The above code is written in typescript, you can convert it to javascript by copying the code and pasting it here which will convert the code to javascript.