GitXplorerGitXplorer
L

requests-darwin

public
13 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
67ae28e9c81bb553617f073553b21b0c175319fb

Some links.

LLukasa committed 9 years ago
Verified
361823bb70efb4fefd8b660809550e8fb597a6b7

Rename to requests-darwin.

LLukasa committed 9 years ago
Verified
92a93a8ac1bb9a4c5f8a6912698b7758384154fe

Get HTTPS functioning.

LLukasa committed 9 years ago
Verified
ed125099b956213a8a6f250509e87c445312aa22

Some more basic topfiles.

LLukasa committed 9 years ago
Verified
edff2c95f4d97135ea47bbe8b6fc5a5d49303950

Basic working example.

LLukasa committed 9 years ago
Verified
9d365c5c9a547d3eb64af99df81ea295698cfb40

Shell of the adapter.

LLukasa committed 9 years ago

README

The README file for this repository.

Requests-Darwin

Integration for the Darwin NSURLSession_ API for Requests.

This module provides a Requests Transport Adapter_ that changes the HTTP backend of Requests from urllib3_ to NSURLSession_. This API, available on modern Darwin platforms like macOS, iOS, watchOS, and tvOS, provides a rich set of functionality to applications that wish to use HTTP. In particular, it provides extremely featureful ties into the operating system itself, allowing the use of caching, TLS, and other features that are not normally available to Python applications.

Using Requests-NSURLSession is extremely simple:

.. code-block:: python

import requests
from requests_darwin.adapter import NSURLSessionAdapter

session = requests.Session()
adapter = NSURLSessionAdapter()
session.mount('http://', adapter)
session.mount('https://', adapter)

response = session.get('http://http2bin.org/get')

Work In Progress

Warning! This is very much a work in progress, and a substantial quantity of functionality is currently missing. Only the most basic HTTP requests can be served at this time, and many Requests features do not function as you'd expect them to.

Please feel free to try this out or to help develop features, but be aware that this is not even close to feature complete at this time.

License

This code is available under the MIT license. See LICENSE for more details.

.. _NSURLSession: https://developer.apple.com/library/mac/documentation/Foundation/Reference/NSURLSession_class/ .. _Transport Adapter: http://docs.python-requests.org/en/master/user/advanced/#transport-adapters .. _urllib3: https://github.com/shazow/urllib3