This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Public domain - https://gist.github.com/nolanw/14b277903a2ba446f75202a6bfd55977 | |
import Foundation | |
extension URLRequest { | |
/** | |
Configures the URL request for `application/x-www-form-urlencoded` data. The request's `httpBody` is set, and values are set for HTTP header fields `Content-Type` and `Content-Length`. | |
- Parameter queryItems: The (name, value) pairs to encode and set as the request's body. |