Swift 的 HTTP 开发包 SwiftHTTP

码农软件 · 软件分类 · 网络工具包 · 2019-02-27 10:29:28

软件介绍

SwiftHTTP 简单封装了 Swift 语言中的 NSURLSession ,简化了 HTTP 请求操作。

示例代码:

var request = HTTPTask()
request.GET("http://www.oschina.net/", parameters: nil, success: {(response: AnyObject?) -> Void in
        if response {
            let data = response as NSData
            let str = NSString(data: data, encoding: NSUTF8StringEncoding)
            println("response: \(str)") //prints the HTML of the page
        }
    },failure: {(error: NSError) -> Void in
        println("error: \(error)")
    })

本文地址:https://www.codercto.com/soft/d/234.html

How to Build a Billion Dollar App

How to Build a Billion Dollar App

George Berkowski / Little, Brown Book Group / 2015-4-1 / USD 24.95

Apps have changed the way we communicate, shop, play, interact and travel and their phenomenal popularity has presented possibly the biggest business opportunity in history. In How to Build a Billi......一起来看看 《How to Build a Billion Dollar App》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器