This library came about through improvements in functionality and techniques of the library developed by Carson Katri called Request.

Some features have been removed and others improved in an effort to make the code more declarative. In addition, we have gained in the handling of the return through the TaskModifier and Middlewares added in this version.

Next steps

Here’s the list of what’s left to finish the first version of RequestDL.

  • Implement unit tests;
  • Implement support for Combine;
  • Document code;
  • Make the Targets available;

Feel free to open PRs and implement these features. After the first version becomes available, we will open to implement new features.


This repository is distributed through SPM, being possible to use it in two ways:

  1. Xcode

In Xcode 14, go to File > Packages > Add Package Dependency..., then paste in

  1. Package.swift

// swift-tools-version:5.7
import PackageDescription

let package = Package(
    name: "MyPackage",
    products: [
            name: "MyPackage",
            targets: ["MyPackage"]
    dependencies: [
        .package(url: "", from: "1.0.0")
    targets: [
            name: "MyPackage",
            dependencies: ["RequestDL"]


This is a preliminary example that shows how to use RequestDL in applications.

func requestGoogle() async throws -> GoogleResponse {
    try await DataTask {
        HeaderGroup {
        Query("apple", forKey: "q")


View Github