.. highlight:: python
.. currentmodule:: urlfetch
======================
urlfetch documentation
======================
urlfetch is a simple, lightweight and easy to use HTTP client for `Python `_.
It is distributed as a single file module and has no dependencies other than the
`Python Standard Library `_.
Getting Started
================
Install
------------
.. code-block:: console
$ pip install urlfetch
OR grab the latest source from github
`ifduyue/urlfetch `_:
.. code-block:: console
$ git clone https://github.com/ifduyue/urlfetch.git
$ cd urlfetch
$ pip install .
Usage
------
>>> import urlfetch
>>> r = urlfetch.get("http://docs.python.org/")
>>> r.status, r.reason
(200, 'OK')
>>> r.getheader('content-type')
'text/html; charset=UTF-8'
>>> r.getheader('Content-Type')
'text/html; charset=UTF-8'
>>> r.content
...
User's Guide
=============
.. toctree::
examples
reference
changelog
contributors
License
=========
Code and documentation are available according to the BSD 2-clause License:
.. include:: ../LICENSE
:literal: