Jump to content
Sign in to follow this  
erfan shaigani

get the contents of a GET http method

Recommended Posts

hi , im using python to make a get request to a my server and I want to get the 'params' 

import requests

url = 'https://w3schools.com/python/demopage.php'

#demonstrate how to use the 'params' parameter:
x = requests.get(url, params = {"model": "Mustang"})

#print the response (the content of the requested file):
print(x.text)

#the file 'demopage.php' looks for a 'model' query string and prints its value.

#the file demo.php looks for a 'model' ...

how can I do that?

Share this post


Link to post
Share on other sites

In php you get the URI params by the $_GET variable.

In your case you would use $_GET['model'] in php to get the value of model value.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...