Open blastar opened 9 years ago
The simplest way to use custom headers with non-auth requests is to use the -[NXOAuth2Request signedRequest]
, make a mutable copy and configure your headers. With OAuth2 this should not affect your request from working as long as you do not touch the Authorization:
header. See here for details
Maybe someone can point me in right direction, but so far it seems that custom headers are applied only to authorization related request. I have kNXOAuth2AccountStoreConfigurationCustomHeaderFields added in my account config, but then doing NXOAuth2Request performMethod: onResource: method - (void)performRequestWithSendingProgressHandler:(NXOAuth2ConnectionSendingProgressHandler)progressHandler responseHandler:(NXOAuth2ConnectionResponseHandler)responseHandler is called in which there is no custom headers handling at all. When added simple: [request setValue:@"yyyy" forHTTPHeaderField:@"xxxxx"]; everything started to work. Is this feature planned? Or kNXOAuth2AccountStoreConfigurationCustomHeaderFields is just useless?