简体   繁体   中英

Is Web Api REST Service

Now, this may be really a stupid question, but i would like to know if ASP.Net Web APIs are actually REST Services at all? If so, what REST rules does it comply.

I have gotten into argument with people saying it is REST but wanted to confirm. Also i shall be glad, if someone can suggest actual REST protocols/standard which any service need to comply to be called a REST service.

I also implemented a Web API Service, with different routing ie {domain}/{controller}/{id}/{somethingelse-maybe} and also {domain}/{controller}>id=&name=

Does using the resources to use Query string does not qualify my service as RESTful? Which of the above is correct? Can i use mixed routing in my service at all?

Please help.

Cheers !!!

By definition REST means, that the service fulfills every required REST constraint .

The words REST and RESTful were exhausted by ppl who probably never read about these constraints. The term Web API is for applications which violate the HATEOAS constraint . The term hypermedia API is for applications which fulfill the HATEOAS constraint. Most of the so called REST applications or REST APIs violate one or more constraints... ( ref )

The URI structure is not a REST concern. You identify a resource with one or more URIs, but a single URI cannot be assigned to multiple resources (the query is part of the URIs). That's all you need to know. (Nice IRIs are for routing purposes, and probably for check the validity of the URI-resource mapping.)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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