Latest 0.0.1
Homepage https://github.com/duanruiying/DryNet
License MIT
Platforms ios 10.0, requires ARC
Dependencies Alamofire
Frameworks UIKit, Foundation
Authors

iOS: 基于Alamofire的网络封装

Prerequisites

  • Xcode 10.2.1
  • iOS 10.0 or later
  • ObjC、Swift 5 or later

Installation

  • pod ‘DryNet’

Features –

配置

var headerDict: [String: String] = [:]
headerDict["appId"] = kNetworkAppID
headerDict["appSecret"] = kNetworkAppSecret
DryNet.requestConfig(withHost: kNetworkHost, ssl: .none, timeout: 10, customHeaders: headerDict)

request

/// 参数
var paramDict: [String: String] = [:]
paramDict["loginAccount"] = ""
paramDict["password"] = ""

/// Request
DryNet.request(withURL: kApiLogin, httpMethod: .post, parameters: paramDict) { (err, resp) in

    if err != nil {
        print(err!)
    }

    if resp != nil {
        print(resp!)
    }
}

Latest podspec

{
    "name": "DryNet",
    "version": "0.0.1",
    "summary": "DryNet",
    "homepage": "https://github.com/duanruiying/DryNet",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "duanruiying": "[email protected]"
    },
    "source": {
        "git": "https://github.com/duanruiying/DryNet.git",
        "tag": "0.0.1"
    },
    "description": "TODO: u57fau4e8eAlamofireu7684u7f51u7edcu5c01u88c5.",
    "swift_version": "5",
    "platforms": {
        "ios": "10.0"
    },
    "requires_arc": true,
    "user_target_xcconfig": {
        "OTHER_LDFLAGS": [
            "-w"
        ]
    },
    "pod_target_xcconfig": {
        "OTHER_LDFLAGS": [
            "-w"
        ]
    },
    "source_files": "DryNet/Classes/Code/**/*",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "dependencies": {
        "Alamofire": [
            "5.0.0-beta.6"
        ]
    }
}

Pin It on Pinterest

Share This