I'm playing with react-native-tor NPM. When testing get request

try {
      // Use built in client to make REST calls to .onion urls routed through the Sock5 proxy !
      const resp = await tor
            credentials: 'omit',
            headers: {
                'Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Firefox/78.0',
              'Accept-Language': 'en-US,en;q=0.5',
              'Upgrade-Insecure-Requests': '1',
              'If-Modified-Since': 'Mon, 01 Feb 2021 13:51:34 GMT',
              'Cache-Control': 'max-age=0',
            method: 'GET',
            mode: 'cors',
        .then((response) => response.json())
        .then((data) => console.log(data));
      // console.log('data:', resp.json());
      return resp;
    } catch (error) {
      console.log('we have error');
      // Catch a network or server error like you normally with any other fetch library

The response I have from console log is {"_U":0,"_V":0,"_W":null,"_X":null} What am I doing wrong?

The onion URL I try to get GET from is just a simple HTML locally hosted hidden service.


You must log in to answer this question.

Browse other questions tagged .