react-native fetch and basic authentication

后端 未结 2 2146
一整个雨季
一整个雨季 2021-02-05 09:33

I tried to use fetch with this syntax:

fetch(\"https://user:password@url\", {
   ...
}).then((response) => {
   ...
}).done();

The same url

2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-05 10:31

    You could have used btoa() instead of using the base_64 module. btoa() is a function on the Window.

提交回复
热议问题