1
Answer

Web API Introduction?

Photo of srinivas m

srinivas m

7y
193
1

What is Web API?

Asp.net web API is a framework for building web API’s i.e.: HTTP based services on top of the .Net framework.

These Services can then be consumed by a broad range of clients like

Ø Browsers

Ø Mobile Applications

Ø Desktop Applications

Ø IOTs:-are an objects or devices that have an IP address that can able to communicate with Internet and internet enabled Devices and objects.

EX: Security Systems, Electronic Appliances, Cards, Smartphones

Creating Rest Full Services Using WEBAPI:-

What are the RESTful Services?

REST-Representational State Transfer. REST is an architectural pattern for creating Services.

Rest Constraints:-

· Client-server:-client sends the request and server sends the response

· Stateless:-The communication between client and the server is stateless i.e:we should not storing the anything related to the server

Cacheable constraint:-this avoids unnecessary processing of request to the server.

Uniform Interface:-defines the interface between the client and the server

Based on the Client Request respective method is awake in the server side using HTTP Accept Verbs: GET, PUT, POST, DELETE

HATEOS (HYPERMEDIA AS THE ENGINE OF APPLICATION STATE):-

In Each request there will be a set of Hyperlinks what actions can be performed on the resource

Answers (1)

0
Photo of veronica.colacci
NA 5 0 20y
Thank you Mykonian - I appreciate the explaination.
0
Photo of Mykonine
NA 520 0 20y
Semi-C programmer here. Hopefully you did accidentally come back... To hardcode this, I would define the conversion factors using preprocessor directives. Use a Switch statement to choose between the conversion factors.
0
Photo of veronica.colacci
NA 5 0 20y
Sorry - did not know I was in the wrong forum. I am not asking for someone to do it - I was asking for help in understanding it, but that's okay - I will look for understanding elsewhere. Thank you for your response - I appreciate it.
0
Photo of james
NA 1.1k 313k 20y
Okay, two things my dear.... #1... you're in a forum for the WRONG language, this is a C# forum, not a C forum. #2... we don't help people with their homework here. Read your textbook and I'm sure you will figure this out on your own. -James