You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow server handlers to send response headers directly (grpc#1599)
Motivation:
The async server call context allows users to set headers which are sent
when the first message is sent. In many cases this is fine, however,
some use cases require the headers to be sent immediately.
Modifications:
- Add `sendHeaders(_:)` to the `GRPCAsyncServerCallContext` which sends
headers to the client and throws if headers have already been written
or it's too late to send them.
Result:
Headers can be sent directly from a server call handler.
Copy file name to clipboardExpand all lines: Sources/GRPC/AsyncAwaitSupport/AsyncServerHandler/ServerHandlerStateMachine/ServerHandlerStateMachine+Actions.swift
Copy file name to clipboardExpand all lines: Sources/GRPC/AsyncAwaitSupport/AsyncServerHandler/ServerHandlerStateMachine/ServerHandlerStateMachine+Draining.swift
Copy file name to clipboardExpand all lines: Sources/GRPC/AsyncAwaitSupport/AsyncServerHandler/ServerHandlerStateMachine/ServerHandlerStateMachine+Finished.swift
Copy file name to clipboardExpand all lines: Sources/GRPC/AsyncAwaitSupport/AsyncServerHandler/ServerHandlerStateMachine/ServerHandlerStateMachine+Handling.swift
Copy file name to clipboardExpand all lines: Sources/GRPC/AsyncAwaitSupport/AsyncServerHandler/ServerHandlerStateMachine/ServerHandlerStateMachine.swift
Copy file name to clipboardExpand all lines: Tests/GRPCTests/AsyncAwaitSupport/AsyncServerHandler/ServerHandlerStateMachine/ServerHandlerStateMachineTests.swift
+4-5
Original file line number
Diff line number
Diff line change
@@ -210,15 +210,15 @@ internal final class ServerHandlerStateMachineTests: GRPCTestCase {
0 commit comments