All Projects → johnlui → Pitaya

johnlui / Pitaya

Licence: mit
🏇 A Swift HTTP / HTTPS networking library just incidentally execute on machines

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Pitaya

Wormholy
iOS network debugging, like a wizard 🧙‍♂️
Stars: ✭ 2,010 (+137.59%)
Mutual labels:  network, https
Fire
🔥A delightful HTTP/HTTPS networking framework for iOS/macOS/watchOS/tvOS platforms written in Swift.
Stars: ✭ 243 (-71.28%)
Mutual labels:  network, https
Libhv
🔥 比libevent、libuv更易用的国产网络库。A c/c++ network library for developing TCP/UDP/SSL/HTTP/WebSocket client/server.
Stars: ✭ 3,355 (+296.57%)
Mutual labels:  network, https
Hp Socket
High Performance TCP/UDP/HTTP Communication Component
Stars: ✭ 4,420 (+422.46%)
Mutual labels:  network, https
Chameleon
Customizable honeypots for monitoring network traffic, bots activities and username\password credentials (DNS, HTTP Proxy, HTTP, HTTPS, SSH, POP3, IMAP, STMP, RDP, VNC, SMB, SOCKS5, Redis, TELNET, Postgres and MySQL)
Stars: ✭ 230 (-72.81%)
Mutual labels:  network, https
Fast Android Networking
🚀 A Complete Fast Android Networking Library that also supports HTTP/2 🚀
Stars: ✭ 5,346 (+531.91%)
Mutual labels:  network, https
Jetsonjs
Embed a JavaScript/WebGL application on a Nvidia Jetson TX2 and stream the results through websockets. It does not rely on CUDA/Jetpack. HDMI touchscreen, virtual keyboard, GPIO control, wifi config are included.
Stars: ✭ 18 (-97.87%)
Mutual labels:  network
Dat React Native
Browse through the web with the Dat protocol in your device!
Stars: ✭ 25 (-97.04%)
Mutual labels:  network
Is Online
Check if the internet connection is up
Stars: ✭ 894 (+5.67%)
Mutual labels:  network
Zltoolkit
一个基于C++11的轻量级网络框架,基于线程池技术可以实现大并发网络IO
Stars: ✭ 838 (-0.95%)
Mutual labels:  network
Stabping
Continuously monitor your connection/ISP's latency & speed and view them in interactive charts
Stars: ✭ 8 (-99.05%)
Mutual labels:  network
Lettuceencrypt
Free, automatic HTTPS certificate generation for ASP.NET Core web apps
Stars: ✭ 939 (+10.99%)
Mutual labels:  https
Diffios
Cisco IOS diff tool
Stars: ✭ 23 (-97.28%)
Mutual labels:  network
Naivecnn
A naive (very simple!) implementation of a convolutional neural network
Stars: ✭ 18 (-97.87%)
Mutual labels:  network
Network miner
Network Miner generates a network map by sending SNMP requests (LLDP/CDP/EDP).
Stars: ✭ 25 (-97.04%)
Mutual labels:  network
Farwest
Framework for building RESTful HATEOAS-driven applications.
Stars: ✭ 18 (-97.87%)
Mutual labels:  https
Pothosblocks
A collection of core processing blocks
Stars: ✭ 7 (-99.17%)
Mutual labels:  network
P2p
Practice project to demonstrate p2p file sharing.
Stars: ✭ 16 (-98.11%)
Mutual labels:  network
Hpnl
High Performance Network Library for RDMA
Stars: ✭ 23 (-97.28%)
Mutual labels:  network
Js Collider
Java network (NIO) application framework: performance and scalability.
Stars: ✭ 25 (-97.04%)
Mutual labels:  network


Thus, programs must be written for people to read, and only incidentally for machines to execute.
Harold Abelson, "Structure and Interpretation of Computer Programs" ( S.I.C.P )

Pitaya is a Swift HTTP / HTTPS networking library for people. Inspired by Alamofire and JustHTTP.


中文简介

Example

Simple

Pita.build(HTTPMethod: .GET, url: "https://httpbin.org/get?hello=Hello%20Pitaya!")
    .responseJSON { (json, response) -> Void in
        print(json["args"]["hello"].stringValue) // get "Hello Pitaya!"
}

All examples

All Examples

Documentation

Read the documentation

中文文档

Features

  • [x] Support Swift Package Manager
  • [x] Elegant APIs for people
  • [x] Support HTTP Basic Authorization
  • [x] Support setting SSL pinning
  • [x] Support setting HTTP raw body (include JSON body)
  • [x] Asynchronous & Queue
  • [x] Upload files fast
  • [x] Internal fully JSON support with JSONNeverDie
  • [x] Support setting custom HTTP headers
  • [x] almost 100% tested

Requirements

  • iOS 7.0+
  • Xcode 10.2 (Swift 5) (v4.x) in the default swift5 branch.
  • Xcode 9 (Swift 4) (v3.x) in swift4 branch.
  • Xcode 8 (Swift 3) (v2.x) in swift3 branch.
  • Xcode 7 (Swift 2) (v1.x) in master branch.
  • Xcode 6.4 (Swift 1.2) before v0.2.3

Installation

Swift Package Manager

You can use The Swift Package Manager to install Pitaya by adding the proper description to your Package.swift file:

import PackageDescription

let package = Package(
    name: "YOUR_PROJECT_NAME",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/johnlui/Pitaya.git", versions: "1.3.4" ..< Version.max)
    ]
)

Note that the Swift Package Manager is still in early design and development, for more infomation checkout it's GitHub Page

Carthage

Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate Pitaya into your Xcode project using Carthage, specify it in your Cartfile:

github "JohnLui/Pitaya"

Then fetch and build Pitaya:

carthage update

At last, add it to "Embedded Binaries" in the general panel use the "Add Other..." button. The Pitaya.framework binary file is lying in ./Carthage/Build/iOS directory.

Manually

git submodule add https://github.com/johnlui/Pitaya.git
open .

then drag Pitaya.xcodeproj into your Project, that's it!

If you want to run your project on devices with Pitaya, just go to PROJECT->TARGETS->[your project name]->General->Embedded Binaries, click +, select Pitaya.frameWork and click "Add".

Source File

Clone all files in the Source directory into your project.

Contribution

You are welcome to fork and submit pull requests.

License

Pitaya is open-sourced software licensed under the MIT license.

中文介绍

Thus, programs must be written for people to read, and only incidentally for machines to execute.(代码是写给人看的,只是恰好能运行。)

Harold Abelson, "Structure and Interpretation of Computer Programs" ( S.I.C.P )

Pitaya(火龙果) 是一个写给人看的纯 Swift 写成的 HTTP / HTTPS 网络库。从 AlamofireJustHTTP 偷了一些创意和代码。

使用示例

基本用法

Pita.build(HTTPMethod: .GET, url: "https://httpbin.org/get?hello=Hello%20Pitaya!")
    .responseJSON { (json, response) -> Void in
        print(json["args"]["hello"].stringValue) // get "Hello Pitaya!"
}

所有用法

All Examples

中文文档

功能

  • [x] 支持 Swift Package Manager
  • [x] 写给人用的优雅 API
  • [x] 支持 HTTP Basic Authorization
  • [x] 支持设置 SSL 钢钉,防“中间人攻击”
  • [x] 支持设置 HTTP raw body (支持 JSON body)
  • [x] 异步、队列
  • [x] 快速文件上传
  • [x] 内置 JSONNeverDie,完全支持 JSON 数据
  • [x] 支持设定 HTTP headers
  • [x] 几乎 100% 测试率

环境要求

  • iOS 7.0+
  • Xcode 10.2 (Swift 5) v4.x 版,位于 swift5 分支(当前默认版本)
  • Xcode 9 (Swift 4) v3.x 版,位于 swift4 分支
  • Xcode 8 (Swift 3) v2.x 版,位于 swift3 分支
  • Xcode 7 (Swift 2) v1.x 版,位于 master 分支
  • Xcode 6.4 (Swift 1.2) 版: v0.2.3

安装

Swift Package Manager

The Swift Package Manager 是苹果伴随 Swift 开源而推出的 Swift 语言包管理工具。

编辑你项目的 Package.swift

import PackageDescription

let package = Package(
    name: "YOUR_PROJECT_NAME",
    targets: [],
    dependencies: [
        .Package(url: "https://github.com/johnlui/Pitaya.git", versions: "1.3.4" ..< Version.max)
    ]
)

Swift Package Manager 依然在开发中,功能不太稳定,建议关注它的 GitHub Page

Carthage

Carthage 是一个去中心化的 Cocoa 应用程序自动依赖添加工具。

使用以下命令安装 Carthage

$ brew update
$ brew install carthage

安装好 Carthage 后,将下列内容加入你项目的 Cartfile:

github "JohnLui/Pitaya"

自动下载、编译 Pitaya:

carthage update

最后,在 general panel 里 的 "Embedded Binaries" 项下点击 "Add Other..." 按钮,Pitaya.framework 已经躺在了 ./Carthage/Build/iOS 目录里。

这种方法目前还不支持 BITCODE,如果需要支持,请直接将 Pitaya.xcodeproj 拖入你的工程。

手动安装

git clone https://github.com/johnlui/Pitaya.git
open Pitaya

在打开的 Finder 窗口中把 Pitaya.xcodeproj 拖到 Xcode 你的文件树里。

真机调试还需要额外的一步:打开 PROJECT->TARGETS->[your project name]->General,找到 Embedded Binaries, 点击 +, 选中 Pitaya.framework,点击“Add”即可。

源代码安装

Source 文件夹下的文件拖进你的文件树里即可。

参与开源

欢迎提交 issue 和 PR,大门永远向所有人敞开。

开源协议

本项目遵循 MIT 协议开源,具体请查看根目录下的 LICENSE 文件。

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].