I have to call a Python Flask API, and pass variable arguments to the API. Below is my API route :
@app.route('/v2/products/category', methods = ['GET'])
def get_price_dif():
page = request.args.get('page')
category = request.args.get('category')
Below is how I call the API with the arguments :
localhost:5000/v2/products/category?page=1&category=Mobiles & Accessories
The problem here is the API is not accepting the blank spaces in between the words "Mobiles", "&" and "Accessories" in the string "Mobiles & Accessories"
If I print the 'category' value received by the API, it shows only "Mobiles"
How do I call the API along with spaces in the category value?