Skip to content

Commit

Permalink
fix: add user-agent to websocket request (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
lawmicha authored Sep 4, 2024
1 parent cbac364 commit 288d164
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ public class AppSyncWebSocketClient: NSObject, ApolloWebSocket.WebSocketClient,

var request = self.request
request.httpBody = Data(startRequest.data.utf8)
let headers = try await authorizer.getWebSocketSubscriptionPayload(request: request)

var headers = try await authorizer.getWebSocketSubscriptionPayload(request: request)
headers.updateValue(await PackageInfo.userAgent, forKey: "User-Agent")
let interceptedEvent = AppSyncRealTimeStartRequest(
id: startRequest.id,
data: startRequest.data,
Expand Down

0 comments on commit 288d164

Please sign in to comment.