PythonIsBae
PythonIsBae

Reputation: 358

GET request returns parameter self is unfulfilled

I have the code:

s = request.Session
s.get(url="http://google.co.uk/")

but this returns:

    s.get(url="http://google.co.uk/")
TypeError: get() missing 1 required positional argument: 'self'

I'm sure it is an easy fix but I can not seem to find it in the request docs, or in my previous codes as I haven't worked with requests for a while.

Upvotes: 0

Views: 132

Answers (1)

Humayun Ahmad Rajib
Humayun Ahmad Rajib

Reputation: 1560

You need to change request.Session instead of requests.Session().You can try it:

import requests

s = requests.Session()
s.get(url="http://google.co.uk/")

Upvotes: 1

Related Questions