"use strict";(self.webpackChunkgrpc_workshop_doc=self.webpackChunkgrpc_workshop_doc||[]).push([[4606],{3905:(e,t,r)=>{r.d(t,{Zo:()=>l,kt:()=>g});var n=r(7294);function a(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?o(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t){if(null==e)return{};var r,n,a=function(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p=n.createContext({}),i=function(e){var t=n.useContext(p),r=t;return e&&(r="function"==typeof e?e(t):s(s({},t),e)),r},l=function(e){var t=i(e.components);return n.createElement(p.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return n.createElement(n.Fragment,{},t)}},m=n.forwardRef((function(e,t){var r=e.components,a=e.mdxType,o=e.originalType,p=e.parentName,l=c(e,["components","mdxType","originalType","parentName"]),u=i(r),m=a,g=u["".concat(p,".").concat(m)]||u[m]||d[m]||o;return r?n.createElement(g,s(s({ref:t},l),{},{components:r})):n.createElement(g,s({ref:t},l))}));function g(e,t){var r=arguments,a=t&&t.mdxType;if("string"==typeof e||a){var o=r.length,s=new Array(o);s[0]=m;var c={};for(var p in t)hasOwnProperty.call(t,p)&&(c[p]=t[p]);c.originalType=e,c[u]="string"==typeof e?e:a,s[1]=c;for(var i=2;i<o;i++)s[i]=r[i];return n.createElement.apply(null,s)}return n.createElement.apply(null,r)}m.displayName="MDXCreateElement"},6072:(e,t,r)=>{r.r(t),r.d(t,{assets:()=>p,contentTitle:()=>s,default:()=>d,frontMatter:()=>o,metadata:()=>c,toc:()=>i});var n=r(7462),a=(r(7294),r(3905));const o={},s="Let's practice some transcoding",c={unversionedId:"Day 1/transcoding/transcoding-practice",id:"Day 1/transcoding/transcoding-practice",title:"Let's practice some transcoding",description:"Try to expose the other methods in our Speaker service. Test them with Postman",source:"@site/docs/Day 1/05-transcoding/02-transcoding-practice.md",sourceDirName:"Day 1/05-transcoding",slug:"/Day 1/transcoding/transcoding-practice",permalink:"/docs/Day 1/transcoding/transcoding-practice",draft:!1,editUrl:"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/docs/Day 1/05-transcoding/02-transcoding-practice.md",tags:[],version:"current",sidebarPosition:2,frontMatter:{},sidebar:"day1",previous:{title:"Transcoding",permalink:"/docs/Day 1/transcoding/"},next:{title:"Documenting gRPC & Testing",permalink:"/docs/Day 1/Documenting gRPC/"}},p={},i=[],l={toc:i},u="wrapper";function d(e){let{components:t,...r}=e;return(0,a.kt)(u,(0,n.Z)({},l,r,{components:t,mdxType:"MDXLayout"}),(0,a.kt)("h1",{id:"lets-practice-some-transcoding"},"Let's practice some transcoding"),(0,a.kt)("p",null,"Try to expose the other methods in our Speaker service. Test them with Postman"),(0,a.kt)("ol",null,(0,a.kt)("li",{parentName:"ol"},"Expose the SpeakerService UpdateAsync operation also as PUT request to browser"),(0,a.kt)("li",{parentName:"ol"},"Expose the SpeakerService Create operation also as POST request to browser"),(0,a.kt)("li",{parentName:"ol"},"Expose the SpeakerService Delete opearation as a DELETE request to the browser")),(0,a.kt)("details",null,(0,a.kt)("summary",null,"Practice, don't open me!"),(0,a.kt)("details",null,(0,a.kt)("summary",null,"PUT"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-csharp"},'rpc Update (SpeakerUpdateRequest) returns (google.protobuf.Empty) {\n  option (google.api.http) = {\n      put: "/v1/speakers/{Id}"\n      body: "*"\n    };\n}\n'))),(0,a.kt)("details",null,(0,a.kt)("summary",null,"DELETE"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-csharp"},'\nrpc Delete (SpeakerFilterRequest) returns (google.protobuf.Empty) {\n  option (google.api.http) = {\n      delete: "/v1/speakers/{Id}"\n    };\n}\n\n'))),(0,a.kt)("details",null,(0,a.kt)("summary",null,"POST"),(0,a.kt)("pre",null,(0,a.kt)("code",{parentName:"pre",className:"language-csharp"},'rpc Create (SpeakerCreateRequest) returns (SpeakerResponse) {\n     option (google.api.http) = {\n      post: "/v1/speakers"\n      body: "*"\n    };\n}\n')))))}d.isMDXComponent=!0}}]);