Get request python as a string -


i wanted send request in python , return string. wanna use string later on. default python return in json format?

req = requests.get(server, auth=('user',"pass")) 

thanks

use python requests. check link, there examples how json response.

req = requests.get(server, auth=('user',"pass")) req.json 

if want string, use

req.text 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -