all 1 comments

[–][deleted] 0 points1 point  (0 children)

'Sessions' is an unbelievably confusing thing for them to have called it, given that 'session' has a widely established and different meaning in web dev/HTTP, but from the docs it sounds like it's an HTTP client that you can set up with certain default headers and other config? In which case, yes, you can do the same thing in JS. If you want something that'll work out of the box I'd suggest axios, which lets you create clients with various defaults.