Skip to main content

a http request class

Project description

session request

PyPI PyPI - Downloads PyPI - Python Version PyPI - License





pip install session-request


# -*- coding: utf-8 -*-

from session_request import Request

class ClientApi(Request):
    def after_request(self, response):
        """请求后 响应处理器"""
        return response.json()

    def get_request(self):
        options = {
            'path': '/get'
        return self.get(**options)

if __name__ == '__main__':
    base_url = ''
    api = ClientApi(base_url=base_url)
    res = api.get_request()

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

session-request-0.0.4.tar.gz (3.1 kB view hashes)

Uploaded source

Built Distribution

session_request-0.0.4-py3-none-any.whl (3.3 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page