---
title: additionalHeaderFields
framework: authenticationservices
role: symbol
role_heading: Instance Property
path: authenticationservices/aswebauthenticationsessionrequest/additionalheaderfields
---

# additionalHeaderFields

Additional headers to send when loading the initial URL.

## Declaration

```swift
var additionalHeaderFields: [String : String]? { get }
```

## Discussion

Discussion Apply these headers only to the initial page, and don’t overwrite any headers that the browser usually sends. This example shows the call to the begin(_:) delegate method when a web browser receives a request from an app. This implementation iterates over the additional header fields from the app’s request and adds them to its own request. func begin(_ request: ASWebAuthenticationSessionRequest!) {     self.request = request

let urlRequest = URLRequest(url: request.url)     // Use the new fields on the URL request.     for (header, value) in request.additionalHeaderFields {         urlRequest.addValue(value, forHTTPHeaderField: header)     }

// Load the URL request. } important: Your browser app needs to add AdditionalHeaderFieldsAreSupported with the value YES to the ASWebAuthenticationSessionWebBrowserSupportCapabilities dictionary in your app’s information property list to use this API. If the system doesn’t find this key in the default browser app, it sends the request to Safari instead.

## See Also

### Interpreting a request

- [url](authenticationservices/aswebauthenticationsessionrequest/url.md)
- [shouldUseEphemeralSession](authenticationservices/aswebauthenticationsessionrequest/shoulduseephemeralsession.md)
- [uuid](authenticationservices/aswebauthenticationsessionrequest/uuid.md)
