How do I refactor this fetch request?
Let me share my async await solution for that:

Because Your fetch function is pretty similar till the res.text(), I would create an own function (fetchData ) for that, what is returning a Promise, what is resolving a res.text()
Now you can assign an async to your getLogsfunction
Lets reorganise your code above
Error handling is missing here, but take care about it 

:
  fetchData = (url) =&gt; {
    return new Promise((res, rej) =&gt; {
      fetch(url)
        .then(r =&gt; r.text())
        .then(text =&gt; {
          res(text)
        })
        .catch(e =&gt; rej(e));
    });
  }

  getLogs = async () =&gt; {
    const { user } = this.props.auth;
    const regxmlPromise = fetchData(`http://127.0.0.1:60000/onexagent/api/registerclient?name=${user.id}`);
    const secondDataPromise = fetchData(`/api/avaya/getid/${user.id}`);
   
    const resolves = await Promise.all([regxmlPromise, secondDataPromise]);
    
    const [firstResultStepOne, secondResultStepOne] = resolves || [];
    
    const secondResultStepTwo = await fetchData(`http://127.0.0.1:60000/onexagent/api/nextnotification?clientid=${secondResultStepOne}`);

    if (firstResultStepOne) {
      const regxml = new XMLParser().parseFromString(firstResultStepOne);
      if (regxml.attributes.ResponseCode === &quot;0&quot;) {
        axios.post(`/api/avaya/register/${user.id}`, regxml);
      }
      console.log(regxml);
    }
    
    if (secondResultStepTwo) {
      const xml = new XMLParser().parseFromString(secondResultStepTwo);
      axios.post(`/api/avaya/getlogs/${user.id}`, xml);
    }
  };