Fetching GET request parameters from Java to Python Hug REST API
I have created a Rest API using Python Hug which accepts a list as a parameter.
import hug
@hug.get('/myFunc/')
def myFunc(textList)
print(len(textList))
print(type(textList))
I am calling the REST API from Java application. The application is passing a Java arrayList to the python API. The size of arrayList is 17. When the Python REST API is called, and I print the length of list on python side, the length of list items is not the same, it is somewhere around 500. Is this due to sending the parameter as a query string in the GET request or is there a conversion issue between Java arrayList and Python List used through Hug Rest API?
the issue has been resolved, by making the api as a POST method, passing the value from Java as request body and fetching the input as body on Python side.
import hug
@hug.post('/myFunc/')
def myFunc(body)
textList = body['textList']