English 中文(简体)
更改状态的电子邮件链接战略
原标题:Strategy for links in emails which alter state

我们收到几封电子邮件 由我们的ASP.NET MVC 3应用程序发出

在其中一封电子邮件中,我们想对电子邮件的页脚加一句“你觉得这有帮助吗?”

如果他们点击“是”,需要在数据库中采取一些行动。

对于这些联系,我应采取什么办法?

我真的不喜欢做一个Get(例如当他们单击链接时)的想法,它会给数据库添加一些东西。 Get s不应该更新状态。 我能不能让它做POST?

我使用ActionMailler 执行电子邮件,如果重要的话。

<强度 > EDIT:

坦白地说,我如何要求“如何”执行MVC的方方面面。我知道我可以创造出一种行动,采取ID,等等,并保存到DB,但是我问从REST式的观点看,什么是正确的方法。

最佳回答

You can create a form and do a POST in an email but it wont work with certain mail clients. Here is a reference from 2007 that shows where it works and where it doesn t: http://www.campaignmonitor.com/blog/post/2435/how-forms-perform-in-html-emai/

ETA:POST当然符合REST模式,但在你的情况中可能不是一个好选择。因为你大概只是为了帮助而增加一个计数器,因此让这个 URL 曝光不会造成很多问题 。

问题回答

暂无回答




相关问题
Allow RESTful DELETE method in asp.net mvc?

im currently setting up asp.net to accept DELETE http verb in the application. However, when i send "DELETE /posts/delete/1" i always get a 405 Method not allow error. I tried to take a look at ...

Most appropriate API for URL shortening service

I ve just finished an online service for shortening URLs (in php5 with Zend Framework); you can enter an URL and you get an short URL (like tinyurl and such sites). I m thinking about the API for ...

Use HTTPClient or HttpUrlConnection? [closed]

We re implementing a REST client on JRE 1.4. Seems two good options for a client REST framework are HttpClient and HttpUrlConnection. Is there a reason to use HttpClient over the JRE s ...

Why can t I find the truststore for an SSL handshake?

I m using the Spring RESTTemplate on the client side to make calls to a REST endpoint. The client in this case is a Spring app and Tomcat is the servlet container. I m running into issues making a ...

Which Http redirects status code to use?

friendfeed.com uses 302. bit.ly uses 301. I had decided to use 303. Do they behave differently in terms of support by browsers ?

Three Step Buyonline The RESTful way

We are re-developing our buyonline functionality and we are doing it the RESTful way. The process is a three step one and the customer is asked to enter data at each step. Let s say the three URL s ...

热门标签