Thanks for the reply. My issue has been resolved. I was requesting invalid data from my API. Everything works now.
Thanks.