Bazooka

1.0.0

🔥 Simple networking in Swift
denniscm190/Bazooka

What's New

First release! 🎉

2021-05-25T13:19:21Z

Bazooka 🚀

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
}

Description

  • Swift Tools 5.3.0

Dependencies

  • None
Last updated: Tue May 25 2021 15:16:40 GMT-0500 (GMT-05:00)