mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-10-06 19:53:08 +00:00
Sends Accept and Content-Type to the NIP86 request
This commit is contained in:
+2
-1
@@ -54,6 +54,7 @@ class Nip86Retriever(
|
||||
.Builder()
|
||||
.url(client.httpUrl)
|
||||
.header("Content-Type", "application/nostr+json+rpc")
|
||||
.header("Accept", "application/nostr+json+rpc")
|
||||
.header("Authorization", authToken)
|
||||
.post(bodyBytes.toRequestBody(CONTENT_TYPE))
|
||||
.build()
|
||||
@@ -73,7 +74,7 @@ class Nip86Retriever(
|
||||
client.parseResponse(body)
|
||||
} catch (e: Exception) {
|
||||
if (e is CancellationException) throw e
|
||||
Log.e("Nip86Retriever", "Failed to parse response: $body", e)
|
||||
Log.e("Nip86Retriever", "Failed to parse response ${client.httpUrl}: $body", e)
|
||||
Nip86Response(error = "Failed to parse response: ${e.message}")
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -128,7 +128,7 @@ fun RelayManagementScreen(
|
||||
remember(relay) {
|
||||
RelayManagementViewModel(
|
||||
relayUrl = relay,
|
||||
signer = accountViewModel.account.signer,
|
||||
account = accountViewModel.account,
|
||||
retriever = retriever,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user