Skip to content

Python print response body | Example code

Simple use requests.get() method to get all body content and use response.json() to get JSON data.

Python print response body examples

Simple example code returned plenty of content.

import requests as requests

r = requests.get("")

Don’t forget to install and import the request module.

Python print response body

Print JSON content

import requests

# Making a get request
response = requests.get('')

# print response

# print json content

Do comment if you have any doubts or suggestions on this Python print topic.

Note: IDE: PyCharm 2021.3.3 (Community Edition)

Windows 10

Python 3.10.1

All Python Examples are in Python 3, so Maybe its different from python 2 or upgraded versions.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.