title: Is it possible to POST a responseType: 'stream' in Axios?
body: <p>I am attempting to edit an instance of Axios so that the response type should be a <code>'stream'</code> rather than standard JSON. </p>
  
  <p>It doesn't seem clear to me from other posts on S.O. how this can be accomplished. </p>
  
  <p>Is this a dead-end??</p>
  
  <h3>My Current Axios Instance :</h3>
  
  <pre class="lang-js prettyprint-override"><code>import axios from 'axios';
  import { URL } from '../urls';
  import {
    requestHandler,
    successHandler,
    errorHandler,
  } from './Handlers';
  
  const Api = axios.create({
    baseURL: `${URL}`,
    withCredentials: true,
  });
  
  Api.interceptors.request.use((request) =&gt; requestHandler(request));
  Api.interceptors.response.use((response) =&gt; successHandler(response), (error) =&gt; errorHandler(error));
  
  export default Api;
  </code></pre>
  
  <h3>Implemented :</h3>
  
  <pre class="lang-js prettyprint-override"><code>const query = {"selections":{"TABLE_A":["COLUMN1"]},"filters":[{"predicates":[]}],"joins":[],"sorts":[],"limit":100,"offset":0}
  const response = await Api.post('/data', query);
  </code></pre>
  
  <p>The <code>axios</code> signature for post looks like this :<br>
  <code>axios.post(url[, data[, config]])</code><br>
  <a href="https://designrevision.com/react-axios/" rel="noreferrer">Example 1</a><br>
  <a href="https://developersjournal.in/how-to-make-a-request-using-axios-api-promise-based-http-client-for-the-browser-and-nodejs/" rel="noreferrer">Example 2</a></p>
  
  <p>This signature doesn't seem to indicate that the newly created instance of <code>axios</code> has a property relating to streams. Ideally, I would be able to do something like this:  </p>
  
  <pre class="lang-js prettyprint-override"><code>const response = await Api.post(URL, responseType: 'stream', query);
  </code></pre>
  
  <p>or potentially :  </p>
  
  <pre class="lang-js prettyprint-override"><code>const response = await Api(responseType: 'stream').post(URL, query);
  </code></pre>