add application/json Content-Type header to requests

This commit is contained in:
Denis-Cosmin NUTIU 2024-12-30 18:49:21 +02:00
parent 3b39dcc283
commit 10f339ca83
2 changed files with 5 additions and 1 deletions

View file

@ -21,6 +21,7 @@ impl BlueSkyClient {
let body = serde_json::to_string(&server_create_session)?;
let token: Token = client
.post("https://bsky.social/xrpc/com.atproto.server.createSession")
.header("Content-Type", "application/json")
.body(body)
.send()
.await?
@ -43,6 +44,7 @@ impl BlueSkyClient {
}
self.client
.post("https://bsky.social/xrpc/com.atproto.repo.createRecord")
.header("Content-Type", "application/json")
.header(
"Authorization",
format!("Bearer, {}", self.auth_token.access_jwt),
@ -57,6 +59,7 @@ impl BlueSkyClient {
let result: Token = self
.client
.post("https://bsky.social/xrpc/com.atproto.server.refreshSession")
.header("Content-Type", "application/json")
.header(
"Authorization",
format!("Bearer, {}", self.auth_token.refresh_jwt),

View file

@ -4,4 +4,5 @@ services:
container_name: bluesky-bot-local-redis
image: redis/redis-stack-server:6.2.6-v17
ports:
- "6379:6379"
- "6379:6379"
- "8001:8001"