我正在使用一個asp.net web api項目,並且我必須通過一個帖子傳遞一個手機號碼。但我無法返回加號。+(加號)登錄Web API路由
我的路線:
config.Routes.MapHttpRoute(
name: "SmsRoute",
routeTemplate: "rest/sms/{country}/{company}/phone/{mobilenumber}",
defaults: new { controller = "Sms", action = "PostSms" });
控制器:
public HttpResponseMessage PostSms(string country, string company, string mobilenumber)
{
return Request.CreateResponse(HttpStatusCode.Created);
}
當我運行上的提琴手這個帖子方法:
http://index.html/rest/sms/se/company/phone/46700101010/messages/out
我得到這樣的響應:
但我希望它能夠給我看加號。
謝謝,但它不是編碼 – Kriistiian 2014-09-30 12:37:53
會發生什麼事,當你使用給定的例子:
要禁用此功能,在
web.config
? – Ofiris 2014-10-01 05:12:53爲什麼選擇投票? – Ofiris 2014-12-15 16:40:30