Using x-www-form-urlencoded Content-Type in WCF

自古美人都是妖i 提交于 2019-12-06 12:03:20

Form posts are not supported by default (content type is not supported) but WCF Samples provides two examples related to this topic:

  • Custom WebContentTypeMapper to add support from new content types
  • Form Post - sample for HTML post but you can check how it works and make your own for JSON

There is also WCFRestContrib project which offers support for form posts. Old Rest Starter Kit also had support for form posts bur REST Starter Kit has never passed community preview. For last upcoming Web-API (it will be the part of future WCF version) support working with forms as well. At the moment Web-API is available as CTP1.

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