All Projects → dduan → Just

dduan / Just

Licence: mit
Swift HTTP for Humans

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Just

Transfer.py
Simple python client to upload files to the transfer.sh service
Stars: ✭ 9 (-99.33%)
Mutual labels:  requests
Performance Bookmarklet
Performance-Bookmarklet helps to analyze the current page through the Resource Timing API, Navigation Timing API and User-Timing - requests by type, domain, load times, marks and more. Sort of a light live WebPageTest.
Stars: ✭ 997 (-25.32%)
Mutual labels:  requests
Api automation test
接口自动化测试平台,已停止维护,看心情改改
Stars: ✭ 1,092 (-18.2%)
Mutual labels:  requests
Xhr.js
🌎 xhr.js is a library(< 2Kb) to make AJAX/HTTP requests with XMLHttpRequest.
Stars: ✭ 12 (-99.1%)
Mutual labels:  requests
Opensourcetest
OpenSourceTest由自动化测试-夜行者社区维护,提供的是更多地灵活性和可配置性
Stars: ✭ 37 (-97.23%)
Mutual labels:  requests
Halive
A fast http and https prober, to check which URLs are alive
Stars: ✭ 47 (-96.48%)
Mutual labels:  requests
Remit
RabbitMQ-backed microservices supporting RPC, pubsub, automatic service discovery and scaling with no code changes.
Stars: ✭ 24 (-98.2%)
Mutual labels:  requests
Weibo Album Crawler
新浪微博相册大图多线程爬虫。
Stars: ✭ 83 (-93.78%)
Mutual labels:  requests
Old issues repo
Deprecated issue-tracking repo, please post new issues or feature requests to istio/istio instead.
Stars: ✭ 37 (-97.23%)
Mutual labels:  requests
Pymoves
PyMoves
Stars: ✭ 55 (-95.88%)
Mutual labels:  requests
Middlewares
💥 Middlewares / Relay / PSR-7 support to Nette Framework (@nette)
Stars: ✭ 13 (-99.03%)
Mutual labels:  requests
Pymap webapp
A webapp version for Raster Map Download Helper
Stars: ✭ 34 (-97.45%)
Mutual labels:  requests
Lushi8
A tutorial for building your own collection of livestream
Stars: ✭ 47 (-96.48%)
Mutual labels:  requests
Saber
⚔️ Saber, PHP异步协程HTTP客户端 | PHP Coroutine HTTP client - Swoole Humanization Library
Stars: ✭ 866 (-35.13%)
Mutual labels:  requests
Rmapy
A unofficial python module for interacting with the Remarkable Cloud
Stars: ✭ 58 (-95.66%)
Mutual labels:  requests
Skillbox Chat 08 19
Skillbox demo application for the Python course
Stars: ✭ 25 (-98.13%)
Mutual labels:  requests
Social Scraper
Tổng hợp script crawl dữ liệu từ các mạng xã hội & website tiếng Việt
Stars: ✭ 47 (-96.48%)
Mutual labels:  requests
Kiss Headers
💡Python package for HTTP/1.1 style headers. Parse headers to objects. Most advanced available structure for http headers.
Stars: ✭ 91 (-93.18%)
Mutual labels:  requests
Pitchfork
🎶 Unofficial python API for pitchfork.com reviews.
Stars: ✭ 67 (-94.98%)
Mutual labels:  requests
Reptile
🏀 Python3 网络爬虫实战(部分含详细教程)猫眼 腾讯视频 豆瓣 研招网 微博 笔趣阁小说 百度热点 B站 CSDN 网易云阅读 阿里文学 百度股票 今日头条 微信公众号 网易云音乐 拉勾 有道 unsplash 实习僧 汽车之家 英雄联盟盒子 大众点评 链家 LPL赛程 台风 梦幻西游、阴阳师藏宝阁 天气 牛客网 百度文库 睡前故事 知乎 Wish
Stars: ✭ 1,048 (-21.5%)
Mutual labels:  requests

Supported Flatform CocoaPods Carthage compatible Build Status

Just is a client-side HTTP library inspired by python-requests - HTTP for Humans.

Features

Just lets you to the following effortlessly:

  • URL queries
  • custom headers
  • form (x-www-form-encoded) / JSON HTTP body
  • redirect control
  • multipart file upload along with form values.
  • basic/digest authentication
  • cookies
  • timeouts
  • synchronous / asynchronous requests
  • upload / download progress tracking for asynchronous requests
  • link headers
  • friendly accessible results

Use

The simplest request with Just looks like this:

//  A simple get request
Just.get("http://httpbin.org/get")

The next example shows how to upload a file along with some data:

//  talk to registration end point
let r = Just.post(
    "http://justiceleauge.org/member/register",
    data: ["username": "barryallen", "password":"ReverseF1ashSucks"],
    files: ["profile_photo": .url(fileURLWithPath:"flash.jpeg", nil)]
)

if r.ok { /* success! */ }

Here's the same example done asynchronously:

//  talk to registration end point
Just.post(
    "http://justiceleauge.org/member/register",
    data: ["username": "barryallen", "password":"ReverseF1ashSucks"],
    files: ["profile_photo": .url(fileURLWithPath:"flash.jpeg", nil)]
) { r in
    if r.ok { /* success! */ }
}

Read Getting Started on the web or in this playground to learn more!

Install

Here are some ways to leverage Just.

Xcode

Add https://github.com/dduan/Just.git the usual way.

Swift Package Manager

Add the following to your dependencies:

.package(url: "https://github.com/dduan/Just.git",  from: "0.8.0")

… and "Just" to your target dependencies.

Carthage

Include the following in your Cartfile:

github "dduan/Just"

Just includes dynamic framework targets for both iOS and OS X.

CocoaPods

The usual way:

platform :ios, '8.0'
use_frameworks!

target 'MyApp' do
  pod 'Just'
end

Manual

Drop Just.xcodeproj into your project navigator. Under the General tab of your project settings, use the plus sign to add Just.framework to Linked Framework and Libraries. Make sure to include the correct version for your target's platform.

It's also common to add Just as a git submodule to your projects repository:

cd path/to/your/project
git submodule add https://github.com/dduan/Just.git

Source File

Put Just.swift directly into your project. Alternately, put it in the Sources folder of a playground. (The latter makes a fun way to explore the web.)

Contribute

Pull requests are welcome. Here are some tips for code contributors:

Work in Just.xcworkspace.

The tests for link headers relies on Github APIs, which has a low per-hour limit. To overcome this, you can edit the Xcode build schemes and add environment variables GITHUB_TOKEN. Learn more about personal tokens here.

For Xcode rebels, checkout Makefile.

HTML documentation pages are generated by literate programmin tool docco

License

MIT, see LICENSE.md.

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