Your SlideShare is downloading. ×
0
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Web API HTTP Pipeline
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Web API HTTP Pipeline

1,040

Published on

Understand the client-side and server-side Web API HTTP Pipelines.

Understand the client-side and server-side Web API HTTP Pipelines.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,040
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • DEMO: rest of section\n
  • DEMO: rest of section\n
  • DEMO: rest of section\n
  • DEMO: rest of section\n
  • Transcript

    • 1. Web API HTTP Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 2. Objectives Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 3. Objectives• Understand the client-side and server- side pipelines Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 4. Objectives• Understand the client-side and server- side pipelines• Send the best HTTP responses for Web API operations Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 5. Objectives• Understand the client-side and server- side pipelines• Send the best HTTP responses for Web API operations• Use the HTTP pipeline objects to handle exceptions Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 6. Objectives• Understand the client-side and server- side pipelines• Send the best HTTP responses for Web API operations• Use the HTTP pipeline objects to handle exceptions• Write your own custom handlers for Web API requests Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 7. Agenda Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 8. Agenda• Pipeline Elements Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 9. Agenda• Pipeline Elements• Client-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 10. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 11. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 12. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses• Exception Handling Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 13. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses• Exception Handling• Custom Handlers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 14. Pipeline Elements Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 15. Pipeline Elements• Request/Response models have pipelines Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 16. Pipeline Elements• Request/Response models have pipelines• Composed of sequential events that fire Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 17. Pipeline Elements• Request/Response models have pipelines• Composed of sequential events that fire• Uses specific objects Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 18. Pipeline Elements• Request/Response models have pipelines• Composed of sequential events that fire• Uses specific objects• Web API has client and server-side pipelines Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 19. HttpRequestMessage Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 20. HttpRequestMessage• Represents all the info about the HTTP request Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 21. HttpRequestMessage• Represents all the info about the HTTP request • URL Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 22. HttpRequestMessage• Represents all the info about the HTTP request • URL • HTTP method Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 23. HttpRequestMessage• Represents all the info about the HTTP request • URL • HTTP method • Headers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 24. HttpResponseMessage Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 25. HttpResponseMessage• Represents all the info about the HTTP response Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 26. HttpResponseMessage• Represents all the info about the HTTP response • Status code Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 27. HttpResponseMessage• Represents all the info about the HTTP response • Status code • Success flag Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 28. HttpResponseMessage• Represents all the info about the HTTP response • Status code • Success flag • Original HTTP request Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 29. HttpMessageHandler Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 30. HttpMessageHandler• Base class implemented by other objects Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 31. HttpMessageHandler• Base class implemented by other objects• Most custom processing code goes here Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 32. HttpMessageHandler• Base class implemented by other objects• Most custom processing code goes here• Able to write custom handlers and put them in the pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 33. Agenda Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 34. Agenda• Pipeline Elements Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 35. Agenda• Pipeline Elements• Client-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 36. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 37. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 38. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses• Exception Handling Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 39. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses• Exception Handling• Custom Handlers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 40. Client-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 41. Client-Side Pipeline• HttpClient sends requests Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 42. Client-Side Pipeline• HttpClient sends requests• Request is an HttpRequestMessage Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 43. Client-Side Pipeline• HttpClient sends requests• Request is an HttpRequestMessage• Request is sent to HttpMessageHandler Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 44. Client-Side Pipeline• HttpClient sends requests• Request is an HttpRequestMessage• Request is sent to HttpMessageHandler• HttpMessageHandler returns HttpResponseMessage Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 45. Client-Side Pipeline• HttpClient sends requests• Request is an HttpRequestMessage• Request is sent to HttpMessageHandler• HttpMessageHandler returns HttpResponseMessage• Default handler is HttpClientHandler Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 46. Client-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 47. Agenda Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 48. Agenda• Pipeline Elements Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 49. Agenda• Pipeline Elements• Client-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 50. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 51. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 52. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses• Exception Handling Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 53. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses• Exception Handling• Custom Handlers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 54. Server-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 55. Server-Side Pipeline• Web host gives the request to HttpServer Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 56. Server-Side Pipeline• Web host gives the request to HttpServer• Request passed through series of HttpMessageHandlers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 57. Server-Side Pipeline• Web host gives the request to HttpServer• Request passed through series of HttpMessageHandlers• Ends with HttpControllerDispatcher Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 58. Server-Side Pipeline• Web host gives the request to HttpServer• Request passed through series of HttpMessageHandlers• Ends with HttpControllerDispatcher• Dispatcher sends request to appropriate Controller which sends Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 59. Agenda Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 60. Agenda• Pipeline Elements Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 61. Agenda• Pipeline Elements• Client-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 62. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 63. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 64. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses• Exception Handling Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 65. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses• Exception Handling• Custom Handlers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 66. Improving CRUD Responses Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 67. Improving CRUD Responses• By default, Web API always sends same HTTP response code Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 68. Improving CRUD Responses• By default, Web API always sends same HTTP response code• Can alter the response to include more accurate info Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 69. Improving CRUD Responses Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 70. Improving CRUD ResponsesLet’s improve a Web API service’s HTTPresponses! Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 71. Agenda Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 72. Agenda• Pipeline Elements Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 73. Agenda• Pipeline Elements• Client-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 74. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 75. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 76. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses• Exception Handling Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 77. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses• Exception Handling• Custom Handlers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 78. Exception Handling Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 79. Exception Handling• Exceptions tend to be vague on client Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 80. Exception Handling• Exceptions tend to be vague on client• HttpResponseException Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 81. Exception Handling• Exceptions tend to be vague on client• HttpResponseException• Can use filters to assign HTTP responses Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 82. Exception Handling Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 83. Exception HandlingLet’s set up an automated way to sendbetter error messages to the client Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 84. Agenda Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 85. Agenda• Pipeline Elements Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 86. Agenda• Pipeline Elements• Client-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 87. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 88. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 89. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses• Exception Handling Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 90. Agenda• Pipeline Elements• Client-Side Pipeline• Server-Side Pipeline• Improving CRUD Responses• Exception Handling• Custom Handlers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 91. Custom Handlers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 92. Custom Handlers• Inherit DelegatingHandler Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 93. Custom Handlers• Inherit DelegatingHandler• Custom code to perform any kind of per request functionality Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 94. Custom Handlers• Inherit DelegatingHandler• Custom code to perform any kind of per request functionality • Logging Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 95. Custom Handlers• Inherit DelegatingHandler• Custom code to perform any kind of per request functionality • Logging • Security Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 96. Custom Handlers• Inherit DelegatingHandler• Custom code to perform any kind of per request functionality • Logging • Security • Handling certain kinds of requests Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 97. Custom Handlers Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 98. Custom HandlersWe’ll add some security to a Web APIservice Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 99. Learn More! Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 100. Learn More!• This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details! Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 101. Learn More!• This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details! Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 102. Learn More!• This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details!• Learn more about Web API on SlideShare: Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company
    • 103. Learn More!• This is an excerpt from a larger course. Visit www.learnnowonline.com for the full details!• Learn more about Web API on SlideShare:  Web API Basics Learn More @ http://www.learnnowonline.com Copyright © by Application Developers Training Company

    ×