Possible to send request directly to Amazon SQS from http (javascript client)?

半腔热情 提交于 2020-01-02 02:21:44

问题


Is it possible to send a messaging request to Amazon's SQS directly from javascript? I'm trying to create a logging system and would love to bypass sending the request to a middleman server. Also, does anybody know of any alternatives to this solution that I may leverage?


回答1:


SQS(and as a matter of fact all aws services) expose REST based apis. You can directly make a http request to the SQS REST api through javascript code. The api documentation id given here.




回答2:


Unless you load your Javascript from the same SQS domain as you're trying to send to then no, due the clients/Javascript Same-Origin Policy you wont be able to cross post to SQS.

Your best bet is to use a middle-man server of your own.



来源:https://stackoverflow.com/questions/8393845/possible-to-send-request-directly-to-amazon-sqs-from-http-javascript-client

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!