swiftparse-platformparse-ios-sdk

How to add headers in Parse Calls in Parse iOS SDK?


I am trying to add some headers to all my parse calls on a global level in my iOS project (using swift). However i am unable to find a way to do so. Can someone help here.


Solution

  • Using ParseClientConfiguration class works fine! Example:

    let configuration = ParseClientConfiguration {
            $0.applicationId = "APLICATION_ID"
            $0.server = "SERVER_URL"
    }
    configuration.urlSessionConfiguration.httpAdditionalHeaders = ["HEADER_KEY" : "HEADER_VALUE"]