Api not working in mozilla add-ons

i’m creating a mozilla extension, api calling from js is not working? i’m using xmlhttprequest

Can you gather any relevant information from error messages in the Browser Console or Add-on Debugging Console?