I have a falcon
script that I am trying to pass multiple parameters
to:
import falcon
import random
import os
import time
waitTime = int(os.environ.get('WAIT_TIME', '2'))
class SomeFunc(object):
def on_get(self, req, response):
req.path, _, query = req.relative_uri.partition('?')
query = falcon.uri.decode(query)
decoded_params = falcon.uri.parse_query_string(query, keep_blank=True, csv=False)
print(decoded_params)
...
api = falcon.API()
api.add_route('/func', SomeFunc())
I need to pass n parameters
to this service. However, when I call it:
curl localhost:8000/servicedb?limit=12&time=1
It prints out just the first parameter:
{'limit': '12'}
What is the correct code on the client/server
to get all parameters?