Swiftpack.co - Package - BiAtoms/Request.swift

Platform Linux Platform Cocoapods Compatible Carthage Compatible License Build Status - Master


A tiny (sync/async) HTTP client written in swift.


Works in linux, iOS, macOS and tvOS


client.request("http://example.com", headers: ["Accept": "text/html"]).response { response, error in    
        if let response = response {
            print(String(cString: response.body))
        } else {



CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate Request.swift into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
target '<Your Target Name>' do
    pod 'Request.swift', '~> 2.2'

Then, run the following command:

$ pod install


Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate Request.swift into your Xcode project using Carthage, specify it in your Cartfile:

github "BiAtoms/Request.swift" ~> 2.2

Run carthage update to build the framework and drag the built RequestSwift.framework into your Xcode project.

Swift Package Manager

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift compiler. It is in early development, but Request.swift does support its use on supported platforms.

Once you have your Swift package set up, adding Request.swift as a dependency is as easy as adding it to the dependencies value of your Package.swift.

dependencies: [
    .package(url: "https://github.com/BiAtoms/Request.swift.git", from: "2.0.0")


See also the list of contributors who participated in this project.


This project is licensed under the MIT License - see the LICENSE file for details


Stars: 6
Help us keep the lights on



2.2.3 - Jul 2, 2018

  • Added option to allow secure connection over self-signed certificate

2.2.2 - May 28, 2018

  • Carthage support

2.2.1 - May 26, 2018

Updated for:

  • Swift 4.1
  • Xcode 9.3
  • SPM tools 4.0

2.2.0 - May 7, 2018

  • Added https:// support

2.1.0 - Mar 13, 2018

  • Code simplifications