F# Type Providers and REST apis

时光总嘲笑我的痴心妄想 提交于 2019-12-07 04:59:05

问题


Is there any reason why the default plug and play F# type providers to web services is soap based wsdl? Is it because of a lack of formal contracts in REST? Such that each REST api may differ significantly and hence making a general REST provider difficult to provide?


回答1:


Type providers need machine-readable type schema to do their jobs well.




回答2:


Type providers need schema. So you could use Open Data Protocol that is REST + schema. For that task you could use ODataTypeProvider that is already implemented.




回答3:


I think that this is because there is no way to know how the API looks. Humans can read the documentation, but the Type Provider cannot. Other APIs have XML specifications, so they are easier.



来源:https://stackoverflow.com/questions/7462694/f-type-providers-and-rest-apis

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