Network

0.6.0

A network request tool based on URLSession
DingSoung/Network

What's New

2017-09-20T09:58:50Z

Release Status

Carthage SwiftPackage

Language Platform

Donate

Introduction

Networks is a lightweight network request tool based on NSURLSession

Supported functions:

  • GET
  • POST
  • Download
  • SSL Pinning
  • Network Reachability, Status and Type

Install

Carthage

Add Cartfile to your project as follows and execute carthage update

github "DingSoung/Network"

Swift Package Manager

import PackageDescription
let package = Package(
    name: "SPMExample",
    dependencies: [
        .Package(url: "https://github.com/DingSoung/Network.git", Version(0,5,0)),
    ]
)

Usage

Execute the request

Network.get(url: "https://DingSoung.tk:520/", success: { (data) in
}, fail: fail)

Advanced usage Example

介绍

Networks是一个轻量级的网络请求工具,基于NSURLSession

支持一下功能:

  • GET
  • POST
  • Download
  • SSL Pinning
  • Network Reachability, Status and Type

用法

在你的工程添加Cartfile如下,并执行carthage update

github "DingSoung/Network"

执行请求

Network.get(url: "https://dingsoung.tk:520/", success: { (data) in
}, fail: fail)

高级的用法参考 Example

Description

  • Swift Tools

Dependencies

  • None
Last updated: Sat Jan 23 2021 17:07:54 GMT-0500 (GMT-05:00)