Compare commits
2 Commits
4b9899c04e
...
269937ff09
Author | SHA1 | Date | |
---|---|---|---|
269937ff09 | |||
a7bc64d61e |
@ -365,11 +365,21 @@ class SelfossApi(
|
||||
suspend fun update(): StatusAndData<String> =
|
||||
bodyOrFailure(
|
||||
client.tryToGet(url("/update")) {
|
||||
headers {
|
||||
append(
|
||||
HttpHeaders.Accept,
|
||||
"text/event-stream",
|
||||
)
|
||||
if (!shouldHavePostLogin()) {
|
||||
parameter("username", appSettingsService.getUserName())
|
||||
parameter("password", appSettingsService.getPassword())
|
||||
}
|
||||
if (appSettingsService
|
||||
.getBasicUserName()
|
||||
.isNotEmpty() &&
|
||||
appSettingsService.getBasicPassword().isNotEmpty()
|
||||
) {
|
||||
headers {
|
||||
append(
|
||||
HttpHeaders.Accept,
|
||||
"text/event-stream",
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user