oxen-io / session-desktop

Session Desktop - Onion routing based messenger
https://getsession.org
GNU General Public License v3.0
1.53k stars 194 forks source link

How to use https request in session desktop project? #3006

Open FoxSmart0302 opened 8 months ago

FoxSmart0302 commented 8 months ago

Is there an existing request for feature?

What feature would you like?

I cant' send request out This is example code. try { const response = await axios.get('https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH&tsyms=USD,JPY,EUR&28475892d249fbdf4a8264d9f16b8e3e1377cc2b9056a78165576b08add3ae3c', { headers: { "Accept": "/", } }); const data = response.data; setPriceData(data); console.log("===priceData:", data, priceData) } catch (error) { console.error('Error fetching crypto prices:', error); }

But I get this error: " Error fetching crypto prices: AxiosError {message: 'Network Error', name: 'AxiosError', code: 'ERR_NETWORK', config: {…}, request: XMLHttpRequest, …} fetchCryptoData /home/smartfox/Docum…et/Dashboard.js:147 GET https://min-api.cryptocompare.com/data/pricemulti?fsyms=BTC,ETH&tsyms=USD,JPY,EUR&2847589… net::ERR_NOT_IMPLEMENTED "

Anything else?

I cant send request out. What's the problem and how to fix this problem? It's urgent problem. Please give me solution.