Skip to content

Conversation

@Nikita20010
Copy link

Summary

Improved the docs/user/quickstart.rst file by adding a clear example showing how to send custom headers with the requests.get() method.

Why

This enhances the documentation by demonstrating a common real-world use case — sending custom headers in HTTP GET requests.

Example Added

>>> import requests
>>> headers = {'User-Agent': 'CustomClient/1.0'}
>>> r = requests.get('https://api.github.com/events', headers=headers)

@sigmavirus24
Copy link
Contributor

This is already documented

Copy link
Author

@Nikita20010 Nikita20010 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback! I’ve updated this PR to include a new example demonstrating how to use the timeout parameter and handle exceptions in requests.get().
This adds a practical, production-relevant use case that wasn’t clearly shown in the current docs.

@sigmavirus24
Copy link
Contributor

Incorrect. Timeouts are also already in the documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants