title: axios equivalent of this curl command
body: <p>I'm trying to convert the following curl into an <code>axios</code> GET request for use in React Native.</p>
  
  <p>Here's what I want to convert:</p>
  
  <pre><code>$ curl --get --user ${client_id}:${client_secret} \
   https://api.shutterstock.com/v2/images/search \
   --data-urlencode "query=donkey" \
   --data-urlencode "page=2" \
   --data-urlencode "per_page=1"
  </code></pre>
  
  <p>Output of above:</p>
  
  <pre><code>{"page":2,"per_page":1,"total_count":42019,"search_id":"g3gruNqeXTnAOggCv9s9hA","data":[{"id":"384331075","aspect":1.1607,"assets":{"preview":{"height":387,"url":"https://image.shutterstock.com/display_pic_with_logo/3969413/384331075/stock-photo-laughing-donkey-good-and-funny-donkey-the-portrait-the-best-photo-of-donkey-in-the-world-384331075.jpg","width":450},"small_thumb":{"height":86,"url":"https://thumb7.shutterstock.com/thumb_small/3969413/384331075/stock-photo-laughing-donkey-good-and-funny-donkey-the-portrait-the-best-photo-of-donkey-in-the-world-384331075.jpg","width":100},"large_thumb":{"height":129,"url":"https://thumb7.shutterstock.com/thumb_large/3969413/384331075/stock-photo-laughing-donkey-good-and-funny-donkey-the-portrait-the-best-photo-of-donkey-in-the-world-384331075.jpg","width":150},"huge_thumb":{"height":260,"url":"https://image.shutterstock.com/image-photo/laughing-donkey-good-funny-portrait-260nw-384331075.jpg","width":302}},"contributor":{"id":"3969413"},"description":"Laughing donkey - good and funny donkey. The Portrait. The best photo of donkey in the world. Northern Cyprus. Karpasia. Karpaz. Dipkarpaz. Rizokarpaso. Apostolos Andreas cape donkey","image_type":"photo","media_type":"image"}],"spellcheck_info":{}}
  </code></pre>
  
  <p>Here's what I did and it just returns a 401 error:</p>
  
  <pre><code>axios.get("https://api.shutterstock.com/v2/images/search?query=donkey&amp;page=2&amp;per_page=1",{ headers: {
        'Authorization': 'Basic client_id:client_secret'
      }}).then(res =&gt; console.log((res)));
  </code></pre>
  
  <p>Also tried with the following but got a 401 error:</p>
  
  <pre><code>axios.get("https://api.shutterstock.com/v2/images/search?query=donkey&amp;page=1&amp;per_page=1",{ headers: {
    user: client_id:client_secret
  }}).then(res =&gt; console.log((res)));
  
  axios.get("https://api.shutterstock.com/v2/images/search?query=donkey&amp;page=1&amp;per_page=1",{ headers: {
    user: client_id, pass: client_secret
  }}).then(res =&gt; console.log((res)));
  </code></pre>
  
  <p>Should I be converting <code>client_id:client_key</code> into a <code>base64encoded</code> string?  Also, how can I include the query params in the request without just appending to the URL?</p>