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

View file

@ -5,3 +5,4 @@ services:
image: redis/redis-stack-server:6.2.6-v17 image: redis/redis-stack-server:6.2.6-v17
ports: ports:
- "6379:6379" - "6379:6379"
- "8001:8001"