Swiftpack.co -  denniscm190/Bazooka as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
denniscm190/Bazooka
🔥 Simple networking in Swift
.package(url: "https://github.com/denniscm190/Bazooka.git", from: "1.0.0")

Bazooka 🚀

Build Status
The easiest way to make HTTP requests in Swift.

Installation

  • In Xcode go to File -> Swift packages -> Add package dependency
  • Copy and paste https://github.com/denniscm190/Bazooka

Usage

import Bazooka

let bazooka = Bazooka()
bazooka.request(url: "https://someurl.come", model: MyModel.self) { response in
    print(response)
}

Example

import SwiftUI
import Bazooka

struct ContentView: View {
    var body: some View {
        Text("Hello, world!")
            .onAppear {
                let bazooka = Bazooka()
                bazooka.request(url: "https://someurl.come", model: MyModel.self) { response in
                    print(response)
                }
            }
    }
}

struct MyModel: Codable {
    var myVar: String
}

GitHub

link
Stars: 0
Last commit: 4 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

First release! 🎉
4 weeks ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API