title: Prevent axios/fetch redirection
body: <p>I have a little problem in my app: 
  I have to get some cookies given in the response of one url, wich one is obtained by making a request to an other url. The request is done, but I'm not able to get the cookies, because when I get the result of my request, I get redirected to/of the site.
  <strong>So my question is</strong>: is there a way to authorize the first redirection, but not the second?</p>
  
  <p>I precize that I'm using react-native, and the axios solution <code>maxRedirects: 1</code> is not working in my case. Same for the <code>redirect: 'manual'</code> in fetch.</p>
  
  <p>The request code:</p>
  
  <pre><code>fetch(
                      'https://gitlab.blablabla.fr/users/auth/ldapmain/callback' ,
                      {
                          method: 'POST',
                          headers: {
                              'Content-Type': 'application/x-www-form-urlencoded',
                              'accept-charset':'utf-8',
                          },
                          body: querystring.stringify({
                              authenticity_token: this.state.token,
                              username: this.state.username,
                              password: this.state.password,
                          }),
                          redirect: 'manual',
                          credentials: 'include',
                          withCredentials: 'true',
  
                      }
                  ).then( (responseData2) =&gt; {
                          console.log(this.state.username +"/"+ this.state.password+ "/"+this.state.token + "/"+ this.state.utf8);
                          console.log(responseData2);
  
  
                      })
  </code></pre>
  
  <p>And the response that is shown : </p>
  
  <pre><code>Response {
    type: 'default',
    status: 200,
    ok: true,
    statusText: undefined,
    headers: 
     Headers {
       map: 
        { 'x-version-id': [Object],
          server: [Object],
          'cache-control': [Object],
          date: [Object],
          'content-type': [Object],
          'content-length': [Object],
          'content-security-policy': [Object],
          'accept-ranges': [Object],
          'x-request-id': [Object],
          'last-modified': [Object],
          'x-frame-options': [Object] } },
    url: 'https://mattermost.blablabla.fr/',
    _bodyInit: '&lt;!DOCTYPE html&gt; &lt;html&gt; the html code&lt;/html&gt; ',
    _bodyText: '&lt;!DOCTYPE html&gt; &lt;html&gt; the html code&lt;/html&gt; ' }
  </code></pre>