Loading

Paste #p2szdajkk

  1. $ curl -d "" http://localhost:8090/api/main/?time=2460000
  2. unsupported operation. POST: time,focus,move,view,fov
  3.  
  4. In [46]: url = "http://localhost:8090/api/main"
  5.     ...: a = requests.put(url, json={"time":2460000})
  6.     ...: print(a.status_code)
  7.     ...: if a.status_code == 200:
  8.     ...:     print(a.json())
  9.     ...:    
  10. 405
  11.  
  12. In [47]: url = "http://localhost:8090/api/main"
  13.     ...: a = requests.post(url, json={"time":2460000})
  14.     ...: print(a.status_code)
  15.     ...: if a.status_code == 200:
  16.     ...:     print(a.json())
  17.     ...:    
  18. 400
  19.  
  20. In [48]: url = "http://localhost:8090/api/main"
  21.     ...: a = requests.post(url, json={"time":{"time":2460000}})
  22.     ...: print(a.status_code)
  23.     ...: if a.status_code == 200:
  24.     ...:     print(a.json())
  25.     ...:    
  26. 400
  27.  
  28. In [49]: url = "http://localhost:8090/api/main"
  29.     ...: a = requests.put(url, json={"time":{"time":2460000}})
  30.     ...: print(a.status_code)
  31.     ...: if a.status_code == 200:
  32.     ...:     print(a.json())
  33.     ...:    
  34. 405

Comments