{"id":39612,"date":"2020-06-25T12:31:42","date_gmt":"2020-06-25T19:31:42","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/premier-developer\/?p=39612"},"modified":"2020-06-22T12:38:51","modified_gmt":"2020-06-22T19:38:51","slug":"how-to-utilize-grpc-web-from-a-blazor-webassembly-application","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/how-to-utilize-grpc-web-from-a-blazor-webassembly-application\/","title":{"rendered":"How to Utilize gRPC-Web From a Blazor WebAssembly Application"},"content":{"rendered":"<p>Premier Developer Consultant <a href=\"https:\/\/www.linkedin.com\/in\/waelkdouh\/\" target=\"_blank\" rel=\"noopener noreferrer\">Wael Kdouh<\/a> demonstrates how to use gRPC-Web from a Blazor WebAssembly Application.<\/p>\n<hr \/>\n<p id=\"1a59\" class=\"fp fq ap cd fr b fs ft fu fv fw fx fy fz ga gb gc gd ge gf gg gh cv\" data-selectable-paragraph=\"\">It&#8217;s no secret by now that there has been a lot of excitement about gRPC recently in the .NET community. gRPC is a modern high-performance RPC (Remote Procedure Call) framework. It is based on HTTP\/2, Protocol Buffers and other modern standard-based technologies. It is also an open standard and is supported by many programming languages, including .NET.<\/p>\n<p id=\"6ccd\" class=\"fp fq ap cd fr b fs ft fu fv fw fx fy fz ga gb gc gd ge gf gg gh cv\" data-selectable-paragraph=\"\">It is currently impossible to implement the gRPC HTTP\/2 spec in the browser because there are no browser APIs with enough fine-grained control over requests. Well the good news is that <a class=\"bw fd gi gj gk gl\" href=\"https:\/\/github.com\/grpc\/grpc\/blob\/master\/doc\/PROTOCOL-WEB.md\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">gRPC-Web<\/a> is here for the rescue!!!<\/p>\n<p id=\"2909\" class=\"fp fq ap cd fr b fs ft fu fv fw fx fy fz ga gb gc gd ge gf gg gh cv\" data-selectable-paragraph=\"\"><a class=\"bw fd gi gj gk gl\" href=\"https:\/\/github.com\/grpc\/grpc\/blob\/master\/doc\/PROTOCOL-WEB.md\" target=\"_blank\" rel=\"noopener nofollow noreferrer\">gRPC-Web<\/a> is a standardized protocol that solves this problem and makes gRPC usable in the browser. gRPC-Web brings many of gRPC\u2019s great features, like small binary messages and contract-first APIs, to modern browser apps. In this post I will demonstrate consuming a gRPC-Web endpoint from within a Blazor WebAssembly application. Along the way I will also demonstrate how gRPC-Web can achieve more efficient payload sizes compared to Restful endpoints.<\/p>\n<p data-selectable-paragraph=\"\"><a href=\"https:\/\/medium.com\/@waelkdouh\/how-to-utilize-grpc-web-from-a-blazor-webassembly-application-e8313444f75b\">Continue reading on Wael&#8217;s blog.<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is currently impossible to implement the gRPC HTTP\/2 spec in the browser because there are no browser APIs with enough fine-grained control over requests. Well the good news is that gRPC-Web is here for the rescue!<\/p>\n","protected":false},"author":582,"featured_media":39613,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[8496,10444],"class_list":["post-39612","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web","tag-blazor","tag-grpc"],"acf":[],"blog_post_summary":"<p>It is currently impossible to implement the gRPC HTTP\/2 spec in the browser because there are no browser APIs with enough fine-grained control over requests. Well the good news is that gRPC-Web is here for the rescue!<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/39612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/582"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=39612"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/39612\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/39613"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=39612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=39612"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=39612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}