Closed wsof401 closed 6 years ago
Hello,
I'm just starting with Apollo on iOS, so I'm not 100% sure and it might not be the recommended way of doing.
Actually you can initialize the ApolloClient
with:
init(url: URL, configuration: URLSessionConfiguration = URLSessionConfiguration.default, sendOperationIdentifiers: Bool = false)
So you can set some custom headers with the URLSessionConfiguration
. This will be done to all your requests though.
Hope it can be helpful.
@paulemmanuel-garcia no, It only worked when the first time you set it
Did you found any solution for this?
@jorgelub12 Yes, A client for addtional headers in memory
Here is some cases we are facing in our app.
When user login app, we need add token to specific request header
For some reason, some custom header should be add to the request.
Is
apollo-ios
support it?URLProtocol
is a solution but not a good one