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

159 Views Asked by At

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.

1

There are 1 best solutions below

0
Belo On BEST ANSWER

Using ParseClientConfiguration class works fine! Example:

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