Forum

Author Topic: Web requests  (Read 2652 times)

MMNN

  • Newbie
  • *
  • Posts: 17
    • View Profile
Web requests
« on: March 10, 2016, 01:31:03 PM »
Hey

I need to post a json file to a server, and according to http://stackoverflow.com/questions/9733638/post-json-using-python-requests it should be possible using:

>>> import requests
>>> r = requests.post('http://httpbin.org/post', json={"key": "value"})

However, PhotoScan doesn't know the module "requests".
Is there any way to add the module or is there another one  that can do the same thing?

Help is much appreciated!

r0xx

  • Jr. Member
  • **
  • Posts: 73
    • View Profile
Re: Web requests
« Reply #1 on: March 15, 2016, 11:26:45 AM »
I think you need to install the library with pip first: http://docs.python-requests.org/en/master/user/install/#install