I created an GET method API for qr-code generation with the help of Lambda service( using python 3.6) and API gateway.

API is working from both postman and from browser when I pass the simple query-string parameter.

> 
> For ex. : <https://xxxxxxxxxxx.amazonaws.com/DEV/qrcode/?data=umaprasad> 
> 
> 
> 

This gives me correct qr code.

When I pass **JSON data in query-string parameter** for the same API it work from **Postman** perfectly 
but when I call the same **API from chrome browser, HTTP ERROR 400 occur**.

> 
> <https://xxxxxxxxxxxxxxxxxxxxxxxx.amazonaws.com/dev/qr-code-generator/?data=>{"sample\_key":"sample\_value"}
> 
> 
> 

[![API Error](https://i.stack.imgur.com/jiW0M.png)](https://i.stack.imgur.com/jiW0M.png)

I allowed the CORS headers too.

How to overcome this problem ?