[REGRESSION] HTTP Basic Auth (#2490)

This commit is contained in:
Djorkaeff Alexandre 2020-09-24 16:06:02 -03:00 committed by GitHub
parent 60dc128c63
commit 101aad4956
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,9 @@
import { InteractionManager } from 'react-native';
import semver from 'semver';
import { Rocketchat as RocketchatClient } from '@rocket.chat/sdk';
import {
Rocketchat as RocketchatClient,
settings as RocketChatSettings
} from '@rocket.chat/sdk';
import { Q } from '@nozbe/watermelondb';
import AsyncStorage from '@react-native-community/async-storage';
import RNFetchBlob from 'rn-fetch-blob';
@ -111,7 +114,7 @@ const RocketChat = {
},
async getServerInfo(server) {
try {
const response = await RNFetchBlob.fetch('GET', `${ server }/api/info`);
const response = await RNFetchBlob.fetch('GET', `${ server }/api/info`, { ...RocketChatSettings.customHeaders });
try {
// Try to resolve as json
const jsonRes = response.json();