Coder Social home page Coder Social logo

pitaya's Introduction

Pitaya

Platform License Language Carthage compatible Travis

Pitaya logo

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

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!"
}

###They are all Asynchronous.

##Features

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

##Requirements

  • iOS 7.0+
  • Xcode 6.4 (Swift 1.2) before v0.2.3
  • Xcode 7 (Swift 2) in current master branch.

##Installation

###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.

pitaya's People

Contributors

johnlui avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.