Add "followRedirects" and "agent" options to request #230
Description
Hello, I'm currently doing a NTLM authentication through RNFB in order to receive a fedAuth cookie. I've been able to crypt/decrypt all the required information through crypto-js but now I'm stuck with the options to give to RFNB.fetch() method (for OkHttp3).
Due to the process of NTLM authentication (createType1Message, parseType2Message, createType3Message), I would like to be able to dynamically set followRedirects to false to OkHttp3. I see the following line in RNFetchBlobReq.java:365 where "true" is hardcoded:
clientBuilder.followRedirects(true);
I also would like to be able to set an agent keepalive for connection in order to keep the socket open. In the other script I used I had some lines like:
var http = require("http");
var keepaliveAgent = new http.Agent({ keepAlive: true });
httpreq.get(url, {
agent: keepaliveAgent,
}, callback);
For now, I think RNFB.fetch() takes METHOD / URL / HEADERS / BODY. Is there any chance you could add these two extra-parameters? Or any suggestions on how to implement this in an other way?
Tell me if I'm not clear enough or if you need additional explanations. Thank you for your time and response.