🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

cd-http

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cd-http

An HTTP wrapper around the wonderful requests library to make it easier for new users and old.

0.2.4
PyPI
Maintainers
1

cd_http

cd_http is a Python package designed for HTTP request handling and manipulation. This package provides a set of tools and utilities to simplify HTTP operations in your projects.

Features

  • Easy HTTP Requests: Simplify the process of making HTTP requests.
  • Proxy Support: Seamlessly integrate proxy support for your requests.
  • Customizable Headers: Easily add and manage custom headers for your HTTP requests.
  • Version Management: Track and manage the package version efficiently.
  • Session support added 0.2.1

Installation

To install cd_http, simply use pip:

pip install cd-http

Usage

Basic Example

import cd_http as cdh

# Make a simple GET request
response = cdh.http.get('https://api.example.com/data')
print(response.text)

Using Proxies

import cd_http as cdh

proxy = 'http://proxy.example.com:8080'
response = cdh.http.get('https://api.example.com/data', proxy=proxy)
print(response.text)

Custom Headers

import cd_http as cdh

headers = {'Authorization': 'Bearer YOUR_TOKEN'}
response = cdh.http.get('https://api.example.com/data', headers=headers)
print(response.json())

Download files

import cd_http as cdh

url = "some file you want to download.mp4"
cdh.http.download_file("destination filepath", url=url)

Examples

You can find more example scripts in the examples directory of the package. These scripts demonstrate various use cases and features of the cd_http package.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request or open an Issue on the GitHub repository.

License

This project is licensed under the MIT License - see the LICENSE file for details.

For more information and DONATIONS, visit codedocta.com.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts