title: react.js: 429 (Too Many Requests) when making 2 requests using axios
body: <p>I am trying to learn React by making a motor cycle spec search web application.</p>
  <p>I am making two axios requests in /api/index.js, and I am getting an error saying</p>
  <p>'429 (Too Many Requests)'.</p>
  <p>What am I doing wrong here?</p>
  <p>/api/index.js</p>
  <pre><code>import axios from &quot;axios&quot;;
  
  const options1 = {
    method: 'GET',
    url: 'https://motorcycle-specs-database.p.rapidapi.com/model/make-name/Yamaha',
    headers: {
      'X-RapidAPI-Host': 'motorcycle-specs-database.p.rapidapi.com',
      'X-RapidAPI-Key': 'MyAPIKey'
    }
  };
  const options2 = {
      method: 'GET',
      url: 'https://motorcycle-specs-database.p.rapidapi.com/make',
      headers: {
        'X-RapidAPI-Host': 'motorcycle-specs-database.p.rapidapi.com',
        'X-RapidAPI-Key': 'MyAPIKey'
      }
    };
   
    export const makeList = async()=&gt;{
      try{
          const {data} = await axios.request(options2);
          console.log('list of all makes is like this now', data);
          return data;
      }
      catch(error){
  
      }
  
    }
   
  export const fetchData = async ()=&gt;{
   try{
       const {data} = await axios.request(options1);
       return data;
  
   } 
   catch(error){
  
   }
  
  }
  
  
  </code></pre>
  <p>and this is where I'm trying to use the data.
  App.js</p>
  <pre><code>import logo from './logo.svg';
  import './App.css';
  import {fetchData, makeList} from './api/index';
  import React, {Component} from 'react';
  
  class App extends React.Component{
    state = {
  
      data:[],
      makes:[],
    }
  
    async componentDidMount(){
      const fetchedData = await fetchData();
      const fetchedMakeList = await makeList();
      this.setState({data:fetchedData, makes:fetchedMakeList});
      //this.setState({makes:fetchedMakeList});
      console.log('list of all makes in componentDIDMOUNT is like ', fetchedMakeList);  
      //why is this undefined??
    }
  
  
  render(){
   
    return (
      &lt;div className=&quot;App&quot;&gt;
        &lt;header className=&quot;App-header&quot;&gt;
        &lt;h1&gt;Some line-ups from YAMAHA&lt;/h1&gt;
        {partOfTheArray.map(data=&gt;{
         return &lt;p&gt;{data.name}&lt;/p&gt; 
        })}
          &lt;a
            className=&quot;App-link&quot;
            href=&quot;https://reactjs.org&quot;
            target=&quot;_blank&quot;
            rel=&quot;noopener noreferrer&quot;
          &gt;
            Open React
          &lt;/a&gt;
        &lt;/header&gt;
      &lt;/div&gt;
    );
  }
  
  }
    
  export default App;
  
  </code></pre>
  <p>I am only requesting 2 requests, but I am getting this error message.</p>