changing the referer in post request in python

203 Views Asked by At

I'm trying to change the referer in post request in the code below but it seems not to work.

request = requests.post("https://someurl.com/", data=result,
                                            headers={'Content-Type': 'application/json',
                                                     "Referer":'https://someotheuerl.com/',
                                                     })

have no idea what to do for fixing this problem

1

There are 1 best solutions below

2
Tal Folkman On

try this:

request = requests.post("https://someurl.com/", data=result, headers={'Content-Type': 'application/json', "referer":'https://someotheuerl.com/'})