Swift Alamofire add custom header to all requests

前端 未结 4 1813
北荒
北荒 2021-01-12 11:13

I tried to add custom header with this:

let manager = Manager.sharedInstance
manager.session.configuration.HTTPAdditionalHeaders = [
    \"Authorization\": \         


        
4条回答
  •  灰色年华
    2021-01-12 12:03

    A way to do this is to use a RequestAdapter as demoed on the Alamofire advanced usage documentation.

提交回复
热议问题