Latest 1.3.5
Homepage https://github.com/keisukeYamagishi/HttpSession
License MIT
Platforms ios 8.0
Authors

HttpSession
HttpSession
HttpSession

Overview

TCP / IP based HTTP communication can be simplified
and Twitter OAuth

API Server: https://httpsession.work/

Recommended.

Codable SwiftyJSON and SWXMLHash is recommended.

Codable

SwiftyJSON

drmohundro/SWXMLHash

Twitter API callback fix

https://developer.twitter.com/en/docs/basics/callback_url.html

Installation

Cocoapods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate GMSDirection into your Xcode project using CocoaPods, specify it in your Podfile:

vi ./Podfile 

If you do not have the google map SDK for iOS

target 'Target Name' do
  use_frameworks!
  pod 'HttpSession'
end

Then, run the following command:

$ pod setup
$ pod install

Use it

Via SSH: For those who plan on regularly making direct commits, cloning over SSH may provide a better experience (which requires uploading SSH keys to GitHub):

$ git clone [email protected]:keisukeYamagishi/HttpSession.git

Via https: For those checking out sources as read-only, HTTPS works best:

$ git clone https://github.com/keisukeYamagishi/HttpSession.git

Sample code

GET http method

Http(url: "http://153.126.160.55/getApi.json", method: .get)
  .session(completion: { (data, responce, error) in
    self.detail(data: data!)
})

POST http method


let param = ["http_post":"Http Request POST 😄"]

Http(url: "http://153.126.160.55/postApi.json",method: .post)
  .session(param: param,
  completion: { (data, responce, error) in {
  self.detail(data: data!, param: param.hashString())
})

Latest podspec

{
    "name": "HttpSession",
    "version": "1.3.5",
    "summary": "Http Session",
    "description": "TCP / IP based HTTP communication can be simplified",
    "homepage": "https://github.com/keisukeYamagishi/HttpSession",
    "license": "MIT",
    "authors": {
        "keisuke": "[email protected]"
    },
    "source": {
        "git": "https://github.com/keisukeYamagishi/HttpSession",
        "tag": "1.3.5"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": [
        "Source",
        "Lib/Lib/src/**/*.swift"
    ]
}

Pin It on Pinterest

Share This