In the above example, the responseJSON handler is appended to the Request to be executed once the Request is complete. Rather than blocking execution to wait for a response from the server, a callback in the form of a closure is specified to handle the response once it’s received. The result of a request is only available inside the scope of a response closure. Any execution contingent on the response or data received from the server must be done within a response closure.
+
In the above example, the responseJSON handler is appended to the Request to be executed once the Request is complete. Rather than blocking execution to wait for a response from the server, a callback in the form of a closure is specified to handle the response once it’s received. The result of a request is only available inside the scope of a response closure. Any execution contingent on the response or data received from the server must be done within a response closure.
Networking in Alamofire is done asynchronously. Asynchronous programming may be a source of frustration to programmers unfamiliar with the concept, but there are very good reasons for doing it this way.
@@ -520,7 +520,7 @@
Response Handling
Response Handler
-
The response handler does NOT evaluate any of the response data. It merely forwards on all information directly from the URL session delegate. It is the Alamofire equivalent of using cURL to execute a Request.
+
The response handler does NOT evaluate any of the response data. It merely forwards on all information directly from the URL session delegate. It is the Alamofire equivalent of using cURL to execute a Request.
We strongly encourage you to leverage the other response serializers taking advantage of Response and Result types.
+
We strongly encourage you to leverage the other response serializers taking advantage of Response and Result types.
Response Data Handler
-
The responseData handler uses the responseDataSerializer (the object that serializes the server data into some other type) to extract the Data returned by the server. If no errors occur and Data is returned, the response Result will be a .success and the value will be of type Data.
+
The responseData handler uses the responseDataSerializer (the object that serializes the server data into some other type) to extract the Data returned by the server. If no errors occur and Data is returned, the response Result will be a .success and the value will be of type Data.
The responseString handler uses the responseStringSerializer to convert the Data returned by the server into a String with the specified encoding. If no errors occur and the server data is successfully serialized into a String, the response Result will be a .success and the value will be of type String.
+
The responseString handler uses the responseStringSerializer to convert the Data returned by the server into a String with the specified encoding. If no errors occur and the server data is successfully serialized into a String, the response Result will be a .success and the value will be of type String.
The responseJSON handler uses the responseJSONSerializer to convert the Data returned by the server into an Any type using the specified JSONSerialization.ReadingOptions. If no errors occur and the server data is successfully serialized into a JSON object, the response Result will be a .success and the value will be of type Any.
+
The responseJSON handler uses the responseJSONSerializer to convert the Data returned by the server into an Any type using the specified JSONSerialization.ReadingOptions. If no errors occur and the server data is successfully serialized into a JSON object, the response Result will be a .success and the value will be of type Any.
It is important to note that using multiple response handlers on the same Request requires the server data to be serialized multiple times. Once for each response handler.
+
It is important to note that using multiple response handlers on the same Request requires the server data to be serialized multiple times. Once for each response handler.
Response Handler Queue
@@ -634,7 +634,7 @@
Response Caching
HTTP Methods
-
The HTTPMethod enumeration lists the HTTP methods defined in RFC 7231 §4.3:
Alamofire supports three types of parameter encoding including: URL, JSON and PropertyList. It can also support any custom encoding that conforms to the ParameterEncoding protocol.
+
Alamofire supports three types of parameter encoding including: URL, JSON and PropertyList. It can also support any custom encoding that conforms to the ParameterEncoding protocol.
URL Encoding
-
The URLEncoding type creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP body of the URL request. Whether the query string is set or appended to any existing URL query string or set as the HTTP body depends on the Destination of the encoding. The Destination enumeration has three cases:
+
The URLEncoding type creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP body of the URL request. Whether the query string is set or appended to any existing URL query string or set as the HTTP body depends on the Destination of the encoding. The Destination enumeration has three cases:
.methodDependent - Applies encoded query string result to existing query string for GET, HEAD and DELETE requests and sets as the HTTP body for requests with any other HTTP method.
@@ -703,7 +703,7 @@
POST Request W
JSON Encoding
-
The JSONEncoding type creates a JSON representation of the parameters object, which is set as the HTTP body of the request. The Content-Type HTTP header field of an encoded request is set to application/json.
+
The JSONEncoding type creates a JSON representation of the parameters object, which is set as the HTTP body of the request. The Content-Type HTTP header field of an encoded request is set to application/json.
The PropertyListEncoding uses PropertyListSerialization to create a plist representation of the parameters object, according to the associated format and write options values, which is set as the body of the request. The Content-Type HTTP header field of an encoded request is set to application/x-plist.
+
The PropertyListEncoding uses PropertyListSerialization to create a plist representation of the parameters object, according to the associated format and write options values, which is set as the body of the request. The Content-Type HTTP header field of an encoded request is set to application/x-plist.
Custom Encoding
-
In the event that the provided ParameterEncoding types do not meet your needs, you can create your own custom encoding. Here’s a quick example of how you could build a custom JSONStringArrayEncoding type to encode a JSON string array onto a Request.
+
In the event that the provided ParameterEncoding types do not meet your needs, you can create your own custom encoding. Here’s a quick example of how you could build a custom JSONStringArrayEncoding type to encode a JSON string array onto a Request.
Adding a custom HTTP header to a Request is supported directly in the global request method. This makes it easy to attach HTTP headers to a Request that can be constantly changing.
+
Adding a custom HTTP header to a Request is supported directly in the global request method. This makes it easy to attach HTTP headers to a Request that can be constantly changing.
For HTTP headers that do not change, it is recommended to set them on the URLSessionConfiguration so they are automatically applied to any URLSessionTask created by the underlying URLSession. For more information, see the Session Manager Configurations section.
-
The default Alamofire SessionManager provides a default set of headers for every Request. These include:
+
The default Alamofire SessionManager provides a default set of headers for every Request. These include:
Accept-Encoding, which defaults to gzip;q=1.0, compress;q=0.5, per RFC 7230 §4.2.3.
@@ -780,7 +780,7 @@
HTTP Headers
User-Agent, which contains versioning information about the current app. For example: iOS Example/1.0 (com.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0, per RFC 7231 §5.5.3.
-
If you need to customize these headers, a custom URLSessionConfiguration should be created, the defaultHTTPHeaders property updated and the configuration applied to a new SessionManager instance.
+
If you need to customize these headers, a custom URLSessionConfiguration should be created, the defaultHTTPHeaders property updated and the configuration applied to a new SessionManager instance.
If a DownloadRequest is cancelled or interrupted, the underlying URL session may generate resume data for the active DownloadRequest. If this happens, the resume data can be re-used to restart the DownloadRequest where it left off. The resume data can be accessed through the download response, then reused when trying to restart the request.
+
If a DownloadRequest is cancelled or interrupted, the underlying URL session may generate resume data for the active DownloadRequest. If this happens, the resume data can be re-used to restart the DownloadRequest where it left off. The resume data can be accessed through the download response, then reused when trying to restart the request.
IMPORTANT: On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), resumeData is broken on background URL session configurations. There’s an underlying bug in the resumeData generation logic where the data is written incorrectly and will always fail to resume the download. For more information about the bug and possible workarounds, please see this Stack Overflow post.
@@ -991,7 +991,7 @@
Uploading Multipart Form
Upload Progress
-
While your user is waiting for their upload to complete, sometimes it can be handy to show the progress of the upload to the user. Any UploadRequest can report both upload progress and download progress of the response data using the uploadProgress and downloadProgress APIs.
+
While your user is waiting for their upload to complete, sometimes it can be handy to show the progress of the upload to the user. Any UploadRequest can report both upload progress and download progress of the response data using the uploadProgress and downloadProgress APIs.
In iOS and tvOS 10 and macOS 10.12, Apple introduced the new URLSessionTaskMetrics APIs. The task metrics encapsulate some fantastic statistical information about the request and response execution. The API is very similar to the Timeline, but provides many more statistics that Alamofire doesn’t have access to compute. The metrics can be accessed through any response type.
+
In iOS and tvOS 10 and macOS 10.12, Apple introduced the new URLSessionTaskMetrics APIs. The task metrics encapsulate some fantastic statistical information about the request and response execution. The API is very similar to the Timeline, but provides many more statistics that Alamofire doesn’t have access to compute. The metrics can be accessed through any response type.
Debugging platform issues can be frustrating. Thankfully, Alamofire Request objects conform to both the CustomStringConvertible and CustomDebugStringConvertible protocols to provide some VERY helpful debugging tools.
+
Debugging platform issues can be frustrating. Thankfully, Alamofire Request objects conform to both the CustomStringConvertible and CustomDebugStringConvertible protocols to provide some VERY helpful debugging tools.
This is not recommended for Authorization or Content-Type headers. Instead, use the headers parameter in the top-level Alamofire.request APIs, URLRequestConvertible and ParameterEncoding, respectively.
+
This is not recommended for Authorization or Content-Type headers. Instead, use the headers parameter in the top-level Alamofire.request APIs, URLRequestConvertible and ParameterEncoding, respectively.
Session Delegate
-
By default, an Alamofire SessionManager instance creates a SessionDelegate object to handle all the various types of delegate callbacks that are generated by the underlying URLSession. The implementations of each delegate method handle the most common use cases for these types of calls abstracting the complexity away from the top-level APIs. However, advanced users may find the need to override the default functionality for various reasons.
+
By default, an Alamofire SessionManager instance creates a SessionDelegate object to handle all the various types of delegate callbacks that are generated by the underlying URLSession. The implementations of each delegate method handle the most common use cases for these types of calls abstracting the complexity away from the top-level APIs. However, advanced users may find the need to override the default functionality for various reasons.
Override Closures
-
The first way to customize the SessionDelegate behavior is through the use of the override closures. Each closure gives you the ability to override the implementation of the matching SessionDelegate API, yet still use the default implementation for all other APIs. This makes it easy to customize subsets of the delegate functionality. Here are a few examples of some of the override closures available:
+
The first way to customize the SessionDelegate behavior is through the use of the override closures. Each closure gives you the ability to override the implementation of the matching SessionDelegate API, yet still use the default implementation for all other APIs. This makes it easy to customize subsets of the delegate functionality. Here are a few examples of some of the override closures available:
Another way to override the default implementation of the SessionDelegate is to subclass it. Subclassing allows you completely customize the behavior of the API or to create a proxy for the API and still use the default implementation. Creating a proxy allows you to log events, emit notifications, provide pre and post hook implementations, etc. Here’s a quick example of subclassing the SessionDelegate and logging a message when a redirect occurs.
+
Another way to override the default implementation of the SessionDelegate is to subclass it. Subclassing allows you completely customize the behavior of the API or to create a proxy for the API and still use the default implementation. Creating a proxy allows you to log events, emit notifications, provide pre and post hook implementations, etc. Here’s a quick example of subclassing the SessionDelegate and logging a message when a redirect occurs.
The result of a request, download, upload or stream methods are a DataRequest, DownloadRequest, UploadRequest and StreamRequest which all inherit from Request. All Request instances are always created by an owning session manager, and never initialized directly.
Each subclass has specialized methods such as authenticate, validate, responseJSON and uploadProgress that each return the caller instance in order to facilitate method chaining.
@@ -1190,10 +1190,10 @@
Request
Routing Requests
-
As apps grow in size, it’s important to adopt common patterns as you build out your network stack. An important part of that design is how to route your requests. The Alamofire URLConvertible and URLRequestConvertible protocols along with the Router design pattern are here to help.
+
As apps grow in size, it’s important to adopt common patterns as you build out your network stack. An important part of that design is how to route your requests. The Alamofire URLConvertible and URLRequestConvertible protocols along with the Router design pattern are here to help.
URLConvertible
-
Types adopting the URLConvertible protocol can be used to construct URLs, which are then used to construct URL requests internally. String, URL, and URLComponents conform to URLConvertible by default, allowing any of them to be passed as url parameters to the request, upload, and download methods:
+
Types adopting the URLConvertible protocol can be used to construct URLs, which are then used to construct URL requests internally. String, URL, and URLComponents conform to URLConvertible by default, allowing any of them to be passed as url parameters to the request, upload, and download methods:
Applications interacting with web applications in a significant manner are encouraged to have custom types conform to URLConvertible as a convenient way to map domain-specific models to server resources.
+
Applications interacting with web applications in a significant manner are encouraged to have custom types conform to URLConvertible as a convenient way to map domain-specific models to server resources.
Types adopting the URLRequestConvertible protocol can be used to construct URL requests. URLRequest conforms to URLRequestConvertible by default, allowing it to be passed into request, upload, and download methods directly (this is the recommended way to specify custom HTTP body for individual requests):
+
Types adopting the URLRequestConvertible protocol can be used to construct URL requests. URLRequest conforms to URLRequestConvertible by default, allowing it to be passed into request, upload, and download methods directly (this is the recommended way to specify custom HTTP body for individual requests):
Applications interacting with web applications in a significant manner are encouraged to have custom types conform to URLRequestConvertible as a way to ensure consistency of requested endpoints. Such an approach can be used to abstract away server-side inconsistencies and provide type-safe routing, as well as manage authentication credentials and other state.
+
Applications interacting with web applications in a significant manner are encouraged to have custom types conform to URLRequestConvertible as a way to ensure consistency of requested endpoints. Such an approach can be used to abstract away server-side inconsistencies and provide type-safe routing, as well as manage authentication credentials and other state.
Most web services these days are behind some sort of authentication system. One of the more common ones today is OAuth. This generally involves generating an access token authorizing your application or user to call the various supported web services. While creating these initial access tokens can be laborsome, it can be even more complicated when your access token expires and you need to fetch a new one. There are many thread-safety issues that need to be considered.
-
The RequestAdapter and RequestRetrier protocols were created to make it much easier to create a thread-safe authentication system for a specific set of web services.
+
The RequestAdapter and RequestRetrier protocols were created to make it much easier to create a thread-safe authentication system for a specific set of web services.
RequestAdapter
-
The RequestAdapter protocol allows each Request made on a SessionManager to be inspected and adapted before being created. One very specific way to use an adapter is to append an Authorization header to requests behind a certain type of authentication.
+
The RequestAdapter protocol allows each Request made on a SessionManager to be inspected and adapted before being created. One very specific way to use an adapter is to append an Authorization header to requests behind a certain type of authentication.
The RequestRetrier protocol allows a Request that encountered an Error while being executed to be retried. When using both the RequestAdapter and RequestRetrier protocols together, you can create credential refresh systems for OAuth1, OAuth2, Basic Auth and even exponential backoff retry policies. The possibilities are endless. Here’s an example of how you could implement a refresh flow for OAuth2 access tokens.
+
The RequestRetrier protocol allows a Request that encountered an Error while being executed to be retried. When using both the RequestAdapter and RequestRetrier protocols together, you can create credential refresh systems for OAuth1, OAuth2, Basic Auth and even exponential backoff retry policies. The possibilities are endless. Here’s an example of how you could implement a refresh flow for OAuth2 access tokens.
-
DISCLAIMER: This is NOT a global OAuth2 solution. It is merely an example demonstrating how one could use the RequestAdapter in conjunction with the RequestRetrier to create a thread-safe refresh system.
+
DISCLAIMER: This is NOT a global OAuth2 solution. It is merely an example demonstrating how one could use the RequestAdapter in conjunction with the RequestRetrier to create a thread-safe refresh system.
To reiterate, do NOT copy this sample code and drop it into a production application. This is merely an example. Each authentication system must be tailored to a particular platform and authentication type.
@@ -1491,7 +1491,7 @@
RequestRetrier
}
-
Once the OAuth2Handler is applied as both the adapter and retrier for the SessionManager, it will handle an invalid access token error by automatically refreshing the access token and retrying all failed requests in the same order they failed.
+
Once the OAuth2Handler is applied as both the adapter and retrier for the SessionManager, it will handle an invalid access token error by automatically refreshing the access token and retrying all failed requests in the same order they failed.
If you needed them to execute in the same order they were created, you could sort them by their task identifiers.
@@ -1521,7 +1521,7 @@
Custom Response Serializa
Response Mapping
-
Response mapping is the simplest way to produce customized responses. It transforms the value of a response, while preserving eventual errors and meta-data. For example, you can turn a json response DataResponse<Any> into a response that holds an application model, such as DataResponse<User>. You perform response mapping with the DataResponse.map method:
+
Response mapping is the simplest way to produce customized responses. It transforms the value of a response, while preserving eventual errors and meta-data. For example, you can turn a json response DataResponse<Any> into a response that holds an application model, such as DataResponse<User>. You perform response mapping with the DataResponse.map method:
Alamofire.request("https://example.com/users/mattt").responseJSON{(response:DataResponse<Any>)inletuserResponse=response.map{jsonin// We assume an existing User(json: Any) initializer
@@ -1777,10 +1777,10 @@
Generic Response
Security
-
Using a secure HTTPS connection when communicating with servers and web services is an important step in securing sensitive data. By default, Alamofire will evaluate the certificate chain provided by the server using Apple’s built in validation provided by the Security framework. While this guarantees the certificate chain is valid, it does not prevent man-in-the-middle (MITM) attacks or other potential vulnerabilities. In order to mitigate MITM attacks, applications dealing with sensitive customer data or financial information should use certificate or public key pinning provided by the ServerTrustPolicy.
+
Using a secure HTTPS connection when communicating with servers and web services is an important step in securing sensitive data. By default, Alamofire will evaluate the certificate chain provided by the server using Apple’s built in validation provided by the Security framework. While this guarantees the certificate chain is valid, it does not prevent man-in-the-middle (MITM) attacks or other potential vulnerabilities. In order to mitigate MITM attacks, applications dealing with sensitive customer data or financial information should use certificate or public key pinning provided by the ServerTrustPolicy.
ServerTrustPolicy
-
The ServerTrustPolicy enumeration evaluates the server trust generally provided by an URLAuthenticationChallenge when connecting to a server over a secure HTTPS connection.
+
The ServerTrustPolicy enumeration evaluates the server trust generally provided by an URLAuthenticationChallenge when connecting to a server over a secure HTTPS connection.
The ServerTrustPolicyManager is responsible for storing an internal mapping of server trust policies to a particular host. This allows Alamofire to evaluate each host against a different server trust policy.
+
The ServerTrustPolicyManager is responsible for storing an internal mapping of server trust policies to a particular host. This allows Alamofire to evaluate each host against a different server trust policy.
Make sure to keep a reference to the new SessionManager instance, otherwise your requests will all get cancelled when your sessionManager is deallocated.
+
Make sure to keep a reference to the new SessionManager instance, otherwise your requests will all get cancelled when your sessionManager is deallocated.
These server trust policies will result in the following behavior:
@@ -1833,7 +1833,7 @@
Server Trust Policy Manager
Subclassing Server Trust Policy Manager
-
If you find yourself needing more flexible server trust policy matching behavior (i.e. wildcarded domains), then subclass the ServerTrustPolicyManager and override the serverTrustPolicyForHost method with your own custom implementation.
+
If you find yourself needing more flexible server trust policy matching behavior (i.e. wildcarded domains), then subclass the ServerTrustPolicyManager and override the serverTrustPolicyForHost method with your own custom implementation.
With the addition of App Transport Security (ATS) in iOS 9, it is possible that using a custom ServerTrustPolicyManager with several ServerTrustPolicy objects will have no effect. If you continuously see CFNetwork SSLHandshake failed (-9806) errors, you have probably run into this problem. Apple’s ATS system overrides the entire challenge system unless you configure the ATS settings in your app’s plist to disable enough of it to allow your app to evaluate the server trust.
+
With the addition of App Transport Security (ATS) in iOS 9, it is possible that using a custom ServerTrustPolicyManager with several ServerTrustPolicy objects will have no effect. If you continuously see CFNetwork SSLHandshake failed (-9806) errors, you have probably run into this problem. Apple’s ATS system overrides the entire challenge system unless you configure the ATS settings in your app’s plist to disable enough of it to allow your app to evaluate the server trust.
If you run into this problem (high probability with self-signed certificates), you can work around this issue by adding the following to your Info.plist.
<dict>
@@ -1887,14 +1887,14 @@
App Transport Security
</dict>
-
Whether you need to set the NSExceptionRequiresForwardSecrecy to NO depends on whether your TLS connection is using an allowed cipher suite. In certain cases, it will need to be set to NO. The NSExceptionAllowsInsecureHTTPLoads MUST be set to YES in order to allow the SessionDelegate to receive challenge callbacks. Once the challenge callbacks are being called, the ServerTrustPolicyManager will take over the server trust evaluation. You may also need to specify the NSTemporaryExceptionMinimumTLSVersion if you’re trying to connect to a host that only supports TLS versions less than 1.2.
+
Whether you need to set the NSExceptionRequiresForwardSecrecy to NO depends on whether your TLS connection is using an allowed cipher suite. In certain cases, it will need to be set to NO. The NSExceptionAllowsInsecureHTTPLoads MUST be set to YES in order to allow the SessionDelegate to receive challenge callbacks. Once the challenge callbacks are being called, the ServerTrustPolicyManager will take over the server trust evaluation. You may also need to specify the NSTemporaryExceptionMinimumTLSVersion if you’re trying to connect to a host that only supports TLS versions less than 1.2.
It is recommended to always use valid certificates in production environments.
Network Reachability
-
The NetworkReachabilityManager listens for reachability changes of hosts and addresses for both WWAN and WiFi network interfaces.
+
The NetworkReachabilityManager listens for reachability changes of hosts and addresses for both WWAN and WiFi network interfaces.
Alamofire is named after the Alamo Fire flower, a hybrid variant of the Bluebonnet, the official state flower of Texas.
What logic belongs in a Router vs. a Request Adapter?
-
Simple, static data such as paths, parameters and common headers belong in the Router. Dynamic data such as an Authorization header whose value can changed based on an authentication system belongs in a RequestAdapter.
+
Simple, static data such as paths, parameters and common headers belong in the Router. Dynamic data such as an Authorization header whose value can changed based on an authentication system belongs in a RequestAdapter.
-
The reason the dynamic data MUST be placed into the RequestAdapter is to support retry operations. When a Request is retried, the original request is not rebuilt meaning the Router will not be called again. The RequestAdapter is called again allowing the dynamic data to be updated on the original request before retrying the Request.
+
The reason the dynamic data MUST be placed into the RequestAdapter is to support retry operations. When a Request is retried, the original request is not rebuilt meaning the Router will not be called again. The RequestAdapter is called again allowing the dynamic data to be updated on the original request before retrying the Request.
In the above example, the responseJSON handler is appended to the Request to be executed once the Request is complete. Rather than blocking execution to wait for a response from the server, a callback in the form of a closure is specified to handle the response once it’s received. The result of a request is only available inside the scope of a response closure. Any execution contingent on the response or data received from the server must be done within a response closure.
+
In the above example, the responseJSON handler is appended to the Request to be executed once the Request is complete. Rather than blocking execution to wait for a response from the server, a callback in the form of a closure is specified to handle the response once it’s received. The result of a request is only available inside the scope of a response closure. Any execution contingent on the response or data received from the server must be done within a response closure.
Networking in Alamofire is done asynchronously. Asynchronous programming may be a source of frustration to programmers unfamiliar with the concept, but there are very good reasons for doing it this way.
@@ -520,7 +520,7 @@
Response Handling
Response Handler
-
The response handler does NOT evaluate any of the response data. It merely forwards on all information directly from the URL session delegate. It is the Alamofire equivalent of using cURL to execute a Request.
+
The response handler does NOT evaluate any of the response data. It merely forwards on all information directly from the URL session delegate. It is the Alamofire equivalent of using cURL to execute a Request.
We strongly encourage you to leverage the other response serializers taking advantage of Response and Result types.
+
We strongly encourage you to leverage the other response serializers taking advantage of Response and Result types.
Response Data Handler
-
The responseData handler uses the responseDataSerializer (the object that serializes the server data into some other type) to extract the Data returned by the server. If no errors occur and Data is returned, the response Result will be a .success and the value will be of type Data.
+
The responseData handler uses the responseDataSerializer (the object that serializes the server data into some other type) to extract the Data returned by the server. If no errors occur and Data is returned, the response Result will be a .success and the value will be of type Data.
The responseString handler uses the responseStringSerializer to convert the Data returned by the server into a String with the specified encoding. If no errors occur and the server data is successfully serialized into a String, the response Result will be a .success and the value will be of type String.
+
The responseString handler uses the responseStringSerializer to convert the Data returned by the server into a String with the specified encoding. If no errors occur and the server data is successfully serialized into a String, the response Result will be a .success and the value will be of type String.
The responseJSON handler uses the responseJSONSerializer to convert the Data returned by the server into an Any type using the specified JSONSerialization.ReadingOptions. If no errors occur and the server data is successfully serialized into a JSON object, the response Result will be a .success and the value will be of type Any.
+
The responseJSON handler uses the responseJSONSerializer to convert the Data returned by the server into an Any type using the specified JSONSerialization.ReadingOptions. If no errors occur and the server data is successfully serialized into a JSON object, the response Result will be a .success and the value will be of type Any.
It is important to note that using multiple response handlers on the same Request requires the server data to be serialized multiple times. Once for each response handler.
+
It is important to note that using multiple response handlers on the same Request requires the server data to be serialized multiple times. Once for each response handler.
Response Handler Queue
@@ -634,7 +634,7 @@
Response Caching
HTTP Methods
-
The HTTPMethod enumeration lists the HTTP methods defined in RFC 7231 §4.3:
Alamofire supports three types of parameter encoding including: URL, JSON and PropertyList. It can also support any custom encoding that conforms to the ParameterEncoding protocol.
+
Alamofire supports three types of parameter encoding including: URL, JSON and PropertyList. It can also support any custom encoding that conforms to the ParameterEncoding protocol.
URL Encoding
-
The URLEncoding type creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP body of the URL request. Whether the query string is set or appended to any existing URL query string or set as the HTTP body depends on the Destination of the encoding. The Destination enumeration has three cases:
+
The URLEncoding type creates a url-encoded query string to be set as or appended to any existing URL query string or set as the HTTP body of the URL request. Whether the query string is set or appended to any existing URL query string or set as the HTTP body depends on the Destination of the encoding. The Destination enumeration has three cases:
.methodDependent - Applies encoded query string result to existing query string for GET, HEAD and DELETE requests and sets as the HTTP body for requests with any other HTTP method.
@@ -703,7 +703,7 @@
POST Request W
JSON Encoding
-
The JSONEncoding type creates a JSON representation of the parameters object, which is set as the HTTP body of the request. The Content-Type HTTP header field of an encoded request is set to application/json.
+
The JSONEncoding type creates a JSON representation of the parameters object, which is set as the HTTP body of the request. The Content-Type HTTP header field of an encoded request is set to application/json.
The PropertyListEncoding uses PropertyListSerialization to create a plist representation of the parameters object, according to the associated format and write options values, which is set as the body of the request. The Content-Type HTTP header field of an encoded request is set to application/x-plist.
+
The PropertyListEncoding uses PropertyListSerialization to create a plist representation of the parameters object, according to the associated format and write options values, which is set as the body of the request. The Content-Type HTTP header field of an encoded request is set to application/x-plist.
Custom Encoding
-
In the event that the provided ParameterEncoding types do not meet your needs, you can create your own custom encoding. Here’s a quick example of how you could build a custom JSONStringArrayEncoding type to encode a JSON string array onto a Request.
+
In the event that the provided ParameterEncoding types do not meet your needs, you can create your own custom encoding. Here’s a quick example of how you could build a custom JSONStringArrayEncoding type to encode a JSON string array onto a Request.
Adding a custom HTTP header to a Request is supported directly in the global request method. This makes it easy to attach HTTP headers to a Request that can be constantly changing.
+
Adding a custom HTTP header to a Request is supported directly in the global request method. This makes it easy to attach HTTP headers to a Request that can be constantly changing.
For HTTP headers that do not change, it is recommended to set them on the URLSessionConfiguration so they are automatically applied to any URLSessionTask created by the underlying URLSession. For more information, see the Session Manager Configurations section.
-
The default Alamofire SessionManager provides a default set of headers for every Request. These include:
+
The default Alamofire SessionManager provides a default set of headers for every Request. These include:
Accept-Encoding, which defaults to gzip;q=1.0, compress;q=0.5, per RFC 7230 §4.2.3.
@@ -780,7 +780,7 @@
HTTP Headers
User-Agent, which contains versioning information about the current app. For example: iOS Example/1.0 (com.alamofire.iOS-Example; build:1; iOS 10.0.0) Alamofire/4.0.0, per RFC 7231 §5.5.3.
-
If you need to customize these headers, a custom URLSessionConfiguration should be created, the defaultHTTPHeaders property updated and the configuration applied to a new SessionManager instance.
+
If you need to customize these headers, a custom URLSessionConfiguration should be created, the defaultHTTPHeaders property updated and the configuration applied to a new SessionManager instance.
If a DownloadRequest is cancelled or interrupted, the underlying URL session may generate resume data for the active DownloadRequest. If this happens, the resume data can be re-used to restart the DownloadRequest where it left off. The resume data can be accessed through the download response, then reused when trying to restart the request.
+
If a DownloadRequest is cancelled or interrupted, the underlying URL session may generate resume data for the active DownloadRequest. If this happens, the resume data can be re-used to restart the DownloadRequest where it left off. The resume data can be accessed through the download response, then reused when trying to restart the request.
IMPORTANT: On the latest release of all the Apple platforms (iOS 10, macOS 10.12, tvOS 10, watchOS 3), resumeData is broken on background URL session configurations. There’s an underlying bug in the resumeData generation logic where the data is written incorrectly and will always fail to resume the download. For more information about the bug and possible workarounds, please see this Stack Overflow post.
@@ -991,7 +991,7 @@
Uploading Multipart Form
Upload Progress
-
While your user is waiting for their upload to complete, sometimes it can be handy to show the progress of the upload to the user. Any UploadRequest can report both upload progress and download progress of the response data using the uploadProgress and downloadProgress APIs.
+
While your user is waiting for their upload to complete, sometimes it can be handy to show the progress of the upload to the user. Any UploadRequest can report both upload progress and download progress of the response data using the uploadProgress and downloadProgress APIs.
In iOS and tvOS 10 and macOS 10.12, Apple introduced the new URLSessionTaskMetrics APIs. The task metrics encapsulate some fantastic statistical information about the request and response execution. The API is very similar to the Timeline, but provides many more statistics that Alamofire doesn’t have access to compute. The metrics can be accessed through any response type.
+
In iOS and tvOS 10 and macOS 10.12, Apple introduced the new URLSessionTaskMetrics APIs. The task metrics encapsulate some fantastic statistical information about the request and response execution. The API is very similar to the Timeline, but provides many more statistics that Alamofire doesn’t have access to compute. The metrics can be accessed through any response type.
Debugging platform issues can be frustrating. Thankfully, Alamofire Request objects conform to both the CustomStringConvertible and CustomDebugStringConvertible protocols to provide some VERY helpful debugging tools.
+
Debugging platform issues can be frustrating. Thankfully, Alamofire Request objects conform to both the CustomStringConvertible and CustomDebugStringConvertible protocols to provide some VERY helpful debugging tools.
This is not recommended for Authorization or Content-Type headers. Instead, use the headers parameter in the top-level Alamofire.request APIs, URLRequestConvertible and ParameterEncoding, respectively.
+
This is not recommended for Authorization or Content-Type headers. Instead, use the headers parameter in the top-level Alamofire.request APIs, URLRequestConvertible and ParameterEncoding, respectively.
Session Delegate
-
By default, an Alamofire SessionManager instance creates a SessionDelegate object to handle all the various types of delegate callbacks that are generated by the underlying URLSession. The implementations of each delegate method handle the most common use cases for these types of calls abstracting the complexity away from the top-level APIs. However, advanced users may find the need to override the default functionality for various reasons.
+
By default, an Alamofire SessionManager instance creates a SessionDelegate object to handle all the various types of delegate callbacks that are generated by the underlying URLSession. The implementations of each delegate method handle the most common use cases for these types of calls abstracting the complexity away from the top-level APIs. However, advanced users may find the need to override the default functionality for various reasons.
Override Closures
-
The first way to customize the SessionDelegate behavior is through the use of the override closures. Each closure gives you the ability to override the implementation of the matching SessionDelegate API, yet still use the default implementation for all other APIs. This makes it easy to customize subsets of the delegate functionality. Here are a few examples of some of the override closures available:
+
The first way to customize the SessionDelegate behavior is through the use of the override closures. Each closure gives you the ability to override the implementation of the matching SessionDelegate API, yet still use the default implementation for all other APIs. This makes it easy to customize subsets of the delegate functionality. Here are a few examples of some of the override closures available:
Another way to override the default implementation of the SessionDelegate is to subclass it. Subclassing allows you completely customize the behavior of the API or to create a proxy for the API and still use the default implementation. Creating a proxy allows you to log events, emit notifications, provide pre and post hook implementations, etc. Here’s a quick example of subclassing the SessionDelegate and logging a message when a redirect occurs.
+
Another way to override the default implementation of the SessionDelegate is to subclass it. Subclassing allows you completely customize the behavior of the API or to create a proxy for the API and still use the default implementation. Creating a proxy allows you to log events, emit notifications, provide pre and post hook implementations, etc. Here’s a quick example of subclassing the SessionDelegate and logging a message when a redirect occurs.
The result of a request, download, upload or stream methods are a DataRequest, DownloadRequest, UploadRequest and StreamRequest which all inherit from Request. All Request instances are always created by an owning session manager, and never initialized directly.
Each subclass has specialized methods such as authenticate, validate, responseJSON and uploadProgress that each return the caller instance in order to facilitate method chaining.
@@ -1190,10 +1190,10 @@
Request
Routing Requests
-
As apps grow in size, it’s important to adopt common patterns as you build out your network stack. An important part of that design is how to route your requests. The Alamofire URLConvertible and URLRequestConvertible protocols along with the Router design pattern are here to help.
+
As apps grow in size, it’s important to adopt common patterns as you build out your network stack. An important part of that design is how to route your requests. The Alamofire URLConvertible and URLRequestConvertible protocols along with the Router design pattern are here to help.
URLConvertible
-
Types adopting the URLConvertible protocol can be used to construct URLs, which are then used to construct URL requests internally. String, URL, and URLComponents conform to URLConvertible by default, allowing any of them to be passed as url parameters to the request, upload, and download methods:
+
Types adopting the URLConvertible protocol can be used to construct URLs, which are then used to construct URL requests internally. String, URL, and URLComponents conform to URLConvertible by default, allowing any of them to be passed as url parameters to the request, upload, and download methods:
Applications interacting with web applications in a significant manner are encouraged to have custom types conform to URLConvertible as a convenient way to map domain-specific models to server resources.
+
Applications interacting with web applications in a significant manner are encouraged to have custom types conform to URLConvertible as a convenient way to map domain-specific models to server resources.
Types adopting the URLRequestConvertible protocol can be used to construct URL requests. URLRequest conforms to URLRequestConvertible by default, allowing it to be passed into request, upload, and download methods directly (this is the recommended way to specify custom HTTP body for individual requests):
+
Types adopting the URLRequestConvertible protocol can be used to construct URL requests. URLRequest conforms to URLRequestConvertible by default, allowing it to be passed into request, upload, and download methods directly (this is the recommended way to specify custom HTTP body for individual requests):
Applications interacting with web applications in a significant manner are encouraged to have custom types conform to URLRequestConvertible as a way to ensure consistency of requested endpoints. Such an approach can be used to abstract away server-side inconsistencies and provide type-safe routing, as well as manage authentication credentials and other state.
+
Applications interacting with web applications in a significant manner are encouraged to have custom types conform to URLRequestConvertible as a way to ensure consistency of requested endpoints. Such an approach can be used to abstract away server-side inconsistencies and provide type-safe routing, as well as manage authentication credentials and other state.
Most web services these days are behind some sort of authentication system. One of the more common ones today is OAuth. This generally involves generating an access token authorizing your application or user to call the various supported web services. While creating these initial access tokens can be laborsome, it can be even more complicated when your access token expires and you need to fetch a new one. There are many thread-safety issues that need to be considered.
-
The RequestAdapter and RequestRetrier protocols were created to make it much easier to create a thread-safe authentication system for a specific set of web services.
+
The RequestAdapter and RequestRetrier protocols were created to make it much easier to create a thread-safe authentication system for a specific set of web services.
RequestAdapter
-
The RequestAdapter protocol allows each Request made on a SessionManager to be inspected and adapted before being created. One very specific way to use an adapter is to append an Authorization header to requests behind a certain type of authentication.
+
The RequestAdapter protocol allows each Request made on a SessionManager to be inspected and adapted before being created. One very specific way to use an adapter is to append an Authorization header to requests behind a certain type of authentication.
The RequestRetrier protocol allows a Request that encountered an Error while being executed to be retried. When using both the RequestAdapter and RequestRetrier protocols together, you can create credential refresh systems for OAuth1, OAuth2, Basic Auth and even exponential backoff retry policies. The possibilities are endless. Here’s an example of how you could implement a refresh flow for OAuth2 access tokens.
+
The RequestRetrier protocol allows a Request that encountered an Error while being executed to be retried. When using both the RequestAdapter and RequestRetrier protocols together, you can create credential refresh systems for OAuth1, OAuth2, Basic Auth and even exponential backoff retry policies. The possibilities are endless. Here’s an example of how you could implement a refresh flow for OAuth2 access tokens.
-
DISCLAIMER: This is NOT a global OAuth2 solution. It is merely an example demonstrating how one could use the RequestAdapter in conjunction with the RequestRetrier to create a thread-safe refresh system.
+
DISCLAIMER: This is NOT a global OAuth2 solution. It is merely an example demonstrating how one could use the RequestAdapter in conjunction with the RequestRetrier to create a thread-safe refresh system.
To reiterate, do NOT copy this sample code and drop it into a production application. This is merely an example. Each authentication system must be tailored to a particular platform and authentication type.
@@ -1491,7 +1491,7 @@
RequestRetrier
}
-
Once the OAuth2Handler is applied as both the adapter and retrier for the SessionManager, it will handle an invalid access token error by automatically refreshing the access token and retrying all failed requests in the same order they failed.
+
Once the OAuth2Handler is applied as both the adapter and retrier for the SessionManager, it will handle an invalid access token error by automatically refreshing the access token and retrying all failed requests in the same order they failed.
If you needed them to execute in the same order they were created, you could sort them by their task identifiers.
@@ -1521,7 +1521,7 @@
Custom Response Serializa
Response Mapping
-
Response mapping is the simplest way to produce customized responses. It transforms the value of a response, while preserving eventual errors and meta-data. For example, you can turn a json response DataResponse<Any> into a response that holds an application model, such as DataResponse<User>. You perform response mapping with the DataResponse.map method:
+
Response mapping is the simplest way to produce customized responses. It transforms the value of a response, while preserving eventual errors and meta-data. For example, you can turn a json response DataResponse<Any> into a response that holds an application model, such as DataResponse<User>. You perform response mapping with the DataResponse.map method:
Alamofire.request("https://example.com/users/mattt").responseJSON{(response:DataResponse<Any>)inletuserResponse=response.map{jsonin// We assume an existing User(json: Any) initializer
@@ -1777,10 +1777,10 @@
Generic Response
Security
-
Using a secure HTTPS connection when communicating with servers and web services is an important step in securing sensitive data. By default, Alamofire will evaluate the certificate chain provided by the server using Apple’s built in validation provided by the Security framework. While this guarantees the certificate chain is valid, it does not prevent man-in-the-middle (MITM) attacks or other potential vulnerabilities. In order to mitigate MITM attacks, applications dealing with sensitive customer data or financial information should use certificate or public key pinning provided by the ServerTrustPolicy.
+
Using a secure HTTPS connection when communicating with servers and web services is an important step in securing sensitive data. By default, Alamofire will evaluate the certificate chain provided by the server using Apple’s built in validation provided by the Security framework. While this guarantees the certificate chain is valid, it does not prevent man-in-the-middle (MITM) attacks or other potential vulnerabilities. In order to mitigate MITM attacks, applications dealing with sensitive customer data or financial information should use certificate or public key pinning provided by the ServerTrustPolicy.
ServerTrustPolicy
-
The ServerTrustPolicy enumeration evaluates the server trust generally provided by an URLAuthenticationChallenge when connecting to a server over a secure HTTPS connection.
+
The ServerTrustPolicy enumeration evaluates the server trust generally provided by an URLAuthenticationChallenge when connecting to a server over a secure HTTPS connection.
The ServerTrustPolicyManager is responsible for storing an internal mapping of server trust policies to a particular host. This allows Alamofire to evaluate each host against a different server trust policy.
+
The ServerTrustPolicyManager is responsible for storing an internal mapping of server trust policies to a particular host. This allows Alamofire to evaluate each host against a different server trust policy.
Make sure to keep a reference to the new SessionManager instance, otherwise your requests will all get cancelled when your sessionManager is deallocated.
+
Make sure to keep a reference to the new SessionManager instance, otherwise your requests will all get cancelled when your sessionManager is deallocated.
These server trust policies will result in the following behavior:
@@ -1833,7 +1833,7 @@
Server Trust Policy Manager
Subclassing Server Trust Policy Manager
-
If you find yourself needing more flexible server trust policy matching behavior (i.e. wildcarded domains), then subclass the ServerTrustPolicyManager and override the serverTrustPolicyForHost method with your own custom implementation.
+
If you find yourself needing more flexible server trust policy matching behavior (i.e. wildcarded domains), then subclass the ServerTrustPolicyManager and override the serverTrustPolicyForHost method with your own custom implementation.
With the addition of App Transport Security (ATS) in iOS 9, it is possible that using a custom ServerTrustPolicyManager with several ServerTrustPolicy objects will have no effect. If you continuously see CFNetwork SSLHandshake failed (-9806) errors, you have probably run into this problem. Apple’s ATS system overrides the entire challenge system unless you configure the ATS settings in your app’s plist to disable enough of it to allow your app to evaluate the server trust.
+
With the addition of App Transport Security (ATS) in iOS 9, it is possible that using a custom ServerTrustPolicyManager with several ServerTrustPolicy objects will have no effect. If you continuously see CFNetwork SSLHandshake failed (-9806) errors, you have probably run into this problem. Apple’s ATS system overrides the entire challenge system unless you configure the ATS settings in your app’s plist to disable enough of it to allow your app to evaluate the server trust.
If you run into this problem (high probability with self-signed certificates), you can work around this issue by adding the following to your Info.plist.
<dict>
@@ -1887,14 +1887,14 @@
App Transport Security
</dict>
-
Whether you need to set the NSExceptionRequiresForwardSecrecy to NO depends on whether your TLS connection is using an allowed cipher suite. In certain cases, it will need to be set to NO. The NSExceptionAllowsInsecureHTTPLoads MUST be set to YES in order to allow the SessionDelegate to receive challenge callbacks. Once the challenge callbacks are being called, the ServerTrustPolicyManager will take over the server trust evaluation. You may also need to specify the NSTemporaryExceptionMinimumTLSVersion if you’re trying to connect to a host that only supports TLS versions less than 1.2.
+
Whether you need to set the NSExceptionRequiresForwardSecrecy to NO depends on whether your TLS connection is using an allowed cipher suite. In certain cases, it will need to be set to NO. The NSExceptionAllowsInsecureHTTPLoads MUST be set to YES in order to allow the SessionDelegate to receive challenge callbacks. Once the challenge callbacks are being called, the ServerTrustPolicyManager will take over the server trust evaluation. You may also need to specify the NSTemporaryExceptionMinimumTLSVersion if you’re trying to connect to a host that only supports TLS versions less than 1.2.
It is recommended to always use valid certificates in production environments.
Network Reachability
-
The NetworkReachabilityManager listens for reachability changes of hosts and addresses for both WWAN and WiFi network interfaces.
+
The NetworkReachabilityManager listens for reachability changes of hosts and addresses for both WWAN and WiFi network interfaces.
Alamofire is named after the Alamo Fire flower, a hybrid variant of the Bluebonnet, the official state flower of Texas.
What logic belongs in a Router vs. a Request Adapter?
-
Simple, static data such as paths, parameters and common headers belong in the Router. Dynamic data such as an Authorization header whose value can changed based on an authentication system belongs in a RequestAdapter.
+
Simple, static data such as paths, parameters and common headers belong in the Router. Dynamic data such as an Authorization header whose value can changed based on an authentication system belongs in a RequestAdapter.
-
The reason the dynamic data MUST be placed into the RequestAdapter is to support retry operations. When a Request is retried, the original request is not rebuilt meaning the Router will not be called again. The RequestAdapter is called again allowing the dynamic data to be updated on the original request before retrying the Request.
+
The reason the dynamic data MUST be placed into the RequestAdapter is to support retry operations. When a Request is retried, the original request is not rebuilt meaning the Router will not be called again. The RequestAdapter is called again allowing the dynamic data to be updated on the original request before retrying the Request.
The Realm URL whose permissions settings should be changed.
- Use * to change the permissions of all Realms managed by the Management Realm’s RLMSyncUser.
+ Use * to change the permissions of all Realms managed by the Management Realm’s RLMSyncUser.
A RLMMigration object used to perform the migration. The
+
A RLMMigration object used to perform the migration. The
migration object allows you to enumerate and alter any
existing objects which require migration.
The Realm URL whose permissions settings should be changed.
- Use * to change the permissions of all Realms managed by the Management Realm’s RLMSyncUser.
+ Use * to change the permissions of all Realms managed by the Management Realm’s RLMSyncUser.
A RLMMigration object used to perform the migration. The
+
A RLMMigration object used to perform the migration. The
migration object allows you to enumerate and alter any
existing objects which require migration.
The objects to be deleted. This can be a List<Object>,
- Results<Object>, or any other Swift Sequence whose
- elements are Objects (subject to the caveats above).
+
The objects to be deleted. This can be a List<Object>,
+ Results<Object>, or any other Swift Sequence whose
+ elements are Objects (subject to the caveats above).
The Realm URL whose permissions settings should be changed.
- Use * to change the permissions of all Realms managed by the Management Realm’s SyncUser.
+ Use * to change the permissions of all Realms managed by the Management Realm’s SyncUser.
The objects to be deleted. This can be a List<Object>,
- Results<Object>, or any other Swift Sequence whose
- elements are Objects (subject to the caveats above).
+
The objects to be deleted. This can be a List<Object>,
+ Results<Object>, or any other Swift Sequence whose
+ elements are Objects (subject to the caveats above).
The Realm URL whose permissions settings should be changed.
- Use * to change the permissions of all Realms managed by the Management Realm’s SyncUser.
+ Use * to change the permissions of all Realms managed by the Management Realm’s SyncUser.
The URL underneath which the API exposes its endpoints. If nil, there is no base URL, and thus you must use
-only resource(absoluteURL:) and resource(baseURL:path:) to acquire resources.
If true, include handling for JSON, text, and images. If false, leave all responses as Data (unless you
-add your own ResponseTransformer using configure(...)).
The handler to use for networking. The default is URLSession with ephemeral session configuration. You can
pass an URLSession, URLSessionConfiguration, or Alamofire.Manager to use an existing provider with
-custom configuration. You can also use your own networking library of choice by implementing NetworkingProvider.
+custom configuration. You can also use your own networking library of choice by implementing NetworkingProvider.
@@ -580,9 +580,9 @@
Parameters
-
Selects the subset of resources to which this configuration applies. You can pass a String, Resource, or
+
Selects the subset of resources to which this configuration applies. You can pass a String, Resource, or
NSRegularExpression for the pattern argument — or write your own custom implementation of
-ConfigurationPatternConvertible.
A closure that receives a mutable Configuration, referenced as $0, which it may modify as it
+
A closure that receives a mutable Configuration, referenced as $0, which it may modify as it
sees fit. This closure will be called whenever Siesta needs to generate or refresh configuration. You should
not rely on it being called at any particular time, and should avoid making it cause side effects.
Determines what happens when the actual content coming down the pipeline doesn’t match InputContentType.
-See InputTypeMismatchAction for options. The default is .error.
The URL underneath which the API exposes its endpoints. If nil, there is no base URL, and thus you must use
-only resource(absoluteURL:) and resource(baseURL:path:) to acquire resources.
If true, include handling for JSON, text, and images. If false, leave all responses as Data (unless you
-add your own ResponseTransformer using configure(...)).
The handler to use for networking. The default is URLSession with ephemeral session configuration. You can
pass an URLSession, URLSessionConfiguration, or Alamofire.Manager to use an existing provider with
-custom configuration. You can also use your own networking library of choice by implementing NetworkingProvider.
+custom configuration. You can also use your own networking library of choice by implementing NetworkingProvider.
@@ -580,9 +580,9 @@
Parameters
-
Selects the subset of resources to which this configuration applies. You can pass a String, Resource, or
+
Selects the subset of resources to which this configuration applies. You can pass a String, Resource, or
NSRegularExpression for the pattern argument — or write your own custom implementation of
-ConfigurationPatternConvertible.
A closure that receives a mutable Configuration, referenced as $0, which it may modify as it
+
A closure that receives a mutable Configuration, referenced as $0, which it may modify as it
sees fit. This closure will be called whenever Siesta needs to generate or refresh configuration. You should
not rely on it being called at any particular time, and should avoid making it cause side effects.
Determines what happens when the actual content coming down the pipeline doesn’t match InputContentType.
-See InputTypeMismatchAction for options. The default is .error.
diff --git a/misc_jazzy_features/after/docs/Other Global Variables.html b/misc_jazzy_features/after/docs/Other Global Variables.html
index 448d29ee0..dd30156b7 100644
--- a/misc_jazzy_features/after/docs/Other Global Variables.html
+++ b/misc_jazzy_features/after/docs/Other Global Variables.html
@@ -106,6 +106,9 @@
diff --git a/misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Other Global Variables.html b/misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Other Global Variables.html
index 448d29ee0..dd30156b7 100644
--- a/misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Other Global Variables.html
+++ b/misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/Other Global Variables.html
@@ -106,6 +106,9 @@