简体   繁体   English

实施简单的Web服务项目的最简单方法?

[英]Easiest way to implement a simple web-service project?

I am creating an add-on for my browser that should report the websites you visit automatically to some remote server (no server response needed). 我正在为浏览器创建一个加载项,该加载项应将您访问的网站自动报告给某个远程服务器(不需要服务器响应)。

The browser extension is written in Javascript, so I suppose XHR requests are available for me to make. 浏览器扩展是用Javascript编写的,因此我想可以提出XHR请求。 The only thing that comes to mind for me is to create a RESTful web-service and use that but I am thinking that there must be an easier way? 我唯一想到的就是创建一个RESTful Web服务并使用它,但是我认为必须有一种更简单的方法吗? or is SOAP the way to go? 还是要走SOAP?

If you want to go with REST and you like Java then I'd recommend jersey: http://jersey.java.net/ 如果您想使用REST并且喜欢Java,那么我建议您选择jersey: http : //jersey.java.net/

If you really want simple and aren't concerned with following all the REST principles you can just make a simple perl cgi or php script and just post the request to it. 如果您真的想简单而不关心遵循所有REST原理,则可以制作一个简单的perl cgi或php脚本,然后将请求发布到该脚本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM