Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
RocketChat
Rocket.Chat.ReactNative
Commits
101aad49
Unverified
Commit
101aad49
authored
Sep 24, 2020
by
Djorkaeff Alexandre
Committed by
GitHub
Sep 24, 2020
Browse files
[REGRESSION] HTTP Basic Auth (#2490)
parent
60dc128c
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/lib/rocketchat.js
View file @
101aad49
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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment