HttpSocket
a library for sending http but with socket!
so, what is it? its a python3 library for sending http request with socket, written in asynchronous [async]
Installation
pip install git+https://github.com/BlackSnowDot/HttpSocket.git
how to use it? i made test.py file for exmaple but alose u can see example here!
requests library
import requests
def main():
response = requests.get('https://random-word-api.herokuapp.com/word?number=5')
print(response.status_code)
print(response.headers)
print(response.text)
if __name__ == '__main__':
main()
HttpSocket Library
import asyncio
import HttpSocket.HttpSocket as HttpSocket
async def main():
response = await HttpSocket.get('random-word-api.herokuapp.com', '/word?number=5')
print(response.status)
print(response.headers)
print(response.body)
if __name__ == '__main__':
asyncio.run(main())
Note: This Library Made By AI :)