| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Networking library written in Swift used in MBurger and other Mumble projects.
With Xcode 11 you can start using Swift Package Manager to add MBNetworkingSwift to your project. Follow those simple steps:
CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate MBNetworkingSwift into your Xcode project using CocoaPods, specify it in your Podfile:
pod 'MBNetworkingSwift'Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate MBNetworkingSwift into your Xcode project using Carthage, specify it in your Cartfile:
github "Mumble-SRL/MBNetworkingSwift"Copy and paste the content of the MBNetworking folder in your project
Example usage:
let urlString = "https://www.example.com/api/test"
let headers = [HTTPHeader(field: "Accept", value: "application/json")]
let parameters = ["key": "value"]
MBNetworking.request(withUrl: urlString,
method: .get,
headers: headers,
parameters: parameters,
encoding: URLParameterEncoder.default) { response in
switch response.result {
case .success(let json):
print(json)
case .error(let error):
print(error.localizedDescription)
}
}| Back | FazBrowse Home | New Git URL |