Thanks Glenn - I tested again, with a query parameter in the URL and I got back the correct response. I then tried testing with a POST to the URL with json in the body (to test i used postman).
I get the following error log - any ideas what's going wrong? Apologies for all the questions, first time I've moved a script from my own device to the "cloud".
2018-05-24 17:21:26,727: [2018-05-24 17:21:26,726] ERROR in app: Exception on / [GET]
2018-05-24 17:21:26,728: Traceback (most recent call last):
2018-05-24 17:21:26,728: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
2018-05-24 17:21:26,728: response = self.full_dispatch_request()
2018-05-24 17:21:26,728: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1642, in full_dispatch_request
2018-05-24 17:21:26,728: response = self.make_response(rv)
2018-05-24 17:21:26,728: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1731, in make_response
2018-05-24 17:21:26,728: raise ValueError('View function did not return a response')
2018-05-24 17:21:26,729: ValueError: View function did not return a response
2018-05-24 17:21:26,726: Exception on / [GET]#012Traceback (most recent call last):#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app#012 response = self.full_dispatch_request()#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1642, in full_dispatch_request#012 response = self.make_response(rv)#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1731, in make_response#012 raise ValueError('View function did not return a response')#012ValueError: View function did not return a response
2018-05-24 17:21:50,486: [2018-05-24 17:21:50,486] ERROR in app: Exception on / [GET]
2018-05-24 17:21:50,486: Traceback (most recent call last):
2018-05-24 17:21:50,486: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
2018-05-24 17:21:50,486: response = self.full_dispatch_request()
2018-05-24 17:21:50,487: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1642, in full_dispatch_request
2018-05-24 17:21:50,487: response = self.make_response(rv)
2018-05-24 17:21:50,487: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1731, in make_response
2018-05-24 17:21:50,487: raise ValueError('View function did not return a response')
2018-05-24 17:21:50,487: ValueError: View function did not return a response
2018-05-24 17:21:50,486: Exception on / [GET]#012Traceback (most recent call last):#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app#012 response = self.full_dispatch_request()#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1642, in full_dispatch_request#012 response = self.make_response(rv)#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1731, in make_response#012 raise ValueError('View function did not return a response')#012ValueError: View function did not return a response
2018-05-24 17:34:32,823: [2018-05-24 17:34:32,823] ERROR in app: Exception on / [GET]
2018-05-24 17:34:32,823: Traceback (most recent call last):
2018-05-24 17:34:32,823: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
2018-05-24 17:34:32,823: response = self.full_dispatch_request()
2018-05-24 17:34:32,823: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1642, in full_dispatch_request
2018-05-24 17:34:32,824: response = self.make_response(rv)
2018-05-24 17:34:32,824: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1731, in make_response
2018-05-24 17:34:32,824: raise ValueError('View function did not return a response')
2018-05-24 17:34:32,824: ValueError: View function did not return a response
2018-05-24 17:34:32,823: Exception on / [GET]#012Traceback (most recent call last):#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app#012 response = self.full_dispatch_request()#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1642, in full_dispatch_request#012 response = self.make_response(rv)#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1731, in make_response#012 raise ValueError('View function did not return a response')#012ValueError: View function did not return a response
2018-05-29 08:33:38,089: [2018-05-29 08:33:38,073] ERROR in app: Exception on / [POST]
2018-05-29 08:33:38,091: Traceback (most recent call last):
2018-05-29 08:33:38,091: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
2018-05-29 08:33:38,091: response = self.full_dispatch_request()
2018-05-29 08:33:38,091: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
2018-05-29 08:33:38,091: rv = self.handle_user_exception(e)
2018-05-29 08:33:38,091: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
2018-05-29 08:33:38,092: reraise(exc_type, exc_value, tb)
2018-05-29 08:33:38,092: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
2018-05-29 08:33:38,092: rv = self.dispatch_request()
2018-05-29 08:33:38,092: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
2018-05-29 08:33:38,092: return self.view_functions[rule.endpoint](**req.view_args)
2018-05-29 08:33:38,092: File "/home/ned06/mysite/flask_app.py", line 43, in abtrigger
2018-05-29 08:33:38,092: response = br.open(url)
2018-05-29 08:33:38,093: File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 203, in open
2018-05-29 08:33:38,093: return self._mech_open(url, data, timeout=timeout)
2018-05-29 08:33:38,093: File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 255, in _mech_open
2018-05-29 08:33:38,093: raise response
2018-05-29 08:33:38,093: httperror_seek_wrapper: HTTP Error 403: Forbidden
2018-05-29 08:33:38,073: Exception on / [POST]#012Traceback (most recent call last):#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app#012 response = self.full_dispatch_request()#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request#012 rv = self.handle_user_exception(e)#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception#012 reraise(exc_type, exc_value, tb)#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request#012 rv = self.dispatch_request()#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request#012 return self.view_functions[rule.endpoint](**req.view_args)#012 File "/home/ned06/mysite/flask_app.py", line 43, in abtrigger#012 response = br.open(url)#012 File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 203, in open#012 return self._mech_open(url, data, timeout=timeout)#012 File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 255, in _mech_open#012 raise response#012httperror_seek_wrapper: HTTP Error 403: Forbidden
2018-05-29 08:38:18,463: [2018-05-29 08:38:18,461] ERROR in app: Exception on / [POST]
2018-05-29 08:38:18,463: Traceback (most recent call last):
2018-05-29 08:38:18,463: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app
2018-05-29 08:38:18,463: response = self.full_dispatch_request()
2018-05-29 08:38:18,464: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request
2018-05-29 08:38:18,464: rv = self.handle_user_exception(e)
2018-05-29 08:38:18,464: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception
2018-05-29 08:38:18,464: reraise(exc_type, exc_value, tb)
2018-05-29 08:38:18,464: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request
2018-05-29 08:38:18,464: rv = self.dispatch_request()
2018-05-29 08:38:18,464: File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request
2018-05-29 08:38:18,464: return self.view_functions[rule.endpoint](**req.view_args)
2018-05-29 08:38:18,464: File "/home/ned06/mysite/flask_app.py", line 43, in abtrigger
2018-05-29 08:38:18,465: response = br.open(url)
2018-05-29 08:38:18,465: File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 203, in open
2018-05-29 08:38:18,465: return self._mech_open(url, data, timeout=timeout)
2018-05-29 08:38:18,465: File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 255, in _mech_open
2018-05-29 08:38:18,465: raise response
2018-05-29 08:38:18,465: httperror_seek_wrapper: HTTP Error 403: Forbidden
2018-05-29 08:38:18,461: Exception on / [POST]#012Traceback (most recent call last):#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1988, in wsgi_app#012 response = self.full_dispatch_request()#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1641, in full_dispatch_request#012 rv = self.handle_user_exception(e)#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1544, in handle_user_exception#012 reraise(exc_type, exc_value, tb)#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1639, in full_dispatch_request#012 rv = self.dispatch_request()#012 File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1625, in dispatch_request#012 return self.view_functions[rule.endpoint](**req.view_args)#012 File "/home/ned06/mysite/flask_app.py", line 43, in abtrigger#012 response = br.open(url)#012 File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 203, in open#012 return self._mech_open(url, data, timeout=timeout)#012 File "/usr/local/lib/python2.7/dist-packages/mechanize/_mechanize.py", line 255, in _mech_open#012 raise response#012httperror_seek_wrapper: HTTP Error 403: Forbidd