<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Case Introduction on Apache Dubbo</title><link>https://deploy-preview-3203--dubbo.netlify.app/en/overview/reference/pixiu/other/user/samples/</link><description>Recent content in Case Introduction on Apache Dubbo</description><generator>Hugo</generator><language>en</language><atom:link href="https://deploy-preview-3203--dubbo.netlify.app/en/overview/reference/pixiu/other/user/samples/index.xml" rel="self" type="application/rss+xml"/><item><title>Introduction to Http Proxy Case</title><link>https://deploy-preview-3203--dubbo.netlify.app/en/overview/reference/pixiu/other/user/samples/http_proxy/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3203--dubbo.netlify.app/en/overview/reference/pixiu/other/user/samples/http_proxy/</guid><description>&lt;h3 id="http-proxy">HTTP Proxy&lt;/h3>
&lt;p>The HTTP Proxy case demonstrates Pixiu&amp;rsquo;s ability to receive external HTTP requests and forward them to the underlying HTTP Server.&lt;/p>
&lt;p>&lt;img alt="img" src="https://deploy-preview-3203--dubbo.netlify.app/imgs/pixiu/user/samples/http_proxy.png">&lt;/p>
&lt;p>For the case code, please refer to &lt;code>/samples/http/simple&lt;/code>. The directory structure and purpose in the case are as follows:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>- pixiu # Pixiu configuration file
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>- server # http server
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>- test # client or unit test
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Let&amp;rsquo;s take a closer look at the specific configuration file for pixiu.&lt;/p></description></item><item><title>Introduction to the Http to Dubbo case</title><link>https://deploy-preview-3203--dubbo.netlify.app/en/overview/reference/pixiu/other/user/samples/http_to_dubbo/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3203--dubbo.netlify.app/en/overview/reference/pixiu/other/user/samples/http_to_dubbo/</guid><description>&lt;p>We welcome you to claim and contribute to this document.&lt;/p></description></item><item><title>Mock Sample Introduction</title><link>https://deploy-preview-3203--dubbo.netlify.app/en/overview/reference/pixiu/other/user/samples/mock/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3203--dubbo.netlify.app/en/overview/reference/pixiu/other/user/samples/mock/</guid><description>&lt;h1 id="mock-request">Mock request&lt;/h1>
&lt;h2 id="simple-demo">Simple Demo&lt;/h2>
&lt;h3 id="api-config">Api Config&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-yaml" data-lang="yaml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">name&lt;/span>: pixiu
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">description&lt;/span>: pixiu sample
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#268bd2">resources&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">path&lt;/span>: &lt;span style="color:#2aa198">&amp;#39;/api/v1/test-dubbo/mock&amp;#39;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">type&lt;/span>: restful
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">description&lt;/span>: mock
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">methods&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> - &lt;span style="color:#268bd2">httpVerb&lt;/span>: GET
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">enable&lt;/span>: &lt;span style="color:#cb4b16">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">mock&lt;/span>: &lt;span style="color:#cb4b16">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">timeout&lt;/span>: 1000ms
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">inboundRequest&lt;/span>:
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">requestType&lt;/span>: http
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="request">Request&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>curl localhost:8888/api/v1/test-dubbo/mock -X GET 
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="response">Response&lt;/h3>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-json" data-lang="json">&lt;span style="display:flex;">&lt;span>{
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#268bd2">&amp;#34;message&amp;#34;&lt;/span>: &lt;span style="color:#2aa198">&amp;#34;mock success&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>}
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="todo">TODO&lt;/h2>
&lt;p>We plan use can config custom result in the future. Not only api config way, but also create a match rule.&lt;/p></description></item><item><title>SpringCloud</title><link>https://deploy-preview-3203--dubbo.netlify.app/en/overview/reference/pixiu/other/user/samples/springcloud/springcloud-springcloud/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3203--dubbo.netlify.app/en/overview/reference/pixiu/other/user/samples/springcloud/springcloud-springcloud/</guid><description>&lt;h1 id="quick-start">Quick Start&lt;/h1>
&lt;p>Start Nacos [Docker environment]:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b58900">cd&lt;/span> samples/springcloud/docker
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>run docker-compose.yml/services
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Start SpringCloud [Java environment]:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#b58900">cd&lt;/span> samples/springcloud/server
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># the port is 8074&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>run auth-service
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># the port is 8071&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>run user-service
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Start Pixiu:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>go run cmd/pixiu/*.go gateway start -c samples/springcloud/pixiu/conf.yaml
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Call the server of SpringCloud by Pixiu :&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># the serviceId is `user-provider`&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>curl http://localhost:8888/user-service/echo/Pixiu
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#586e75"># the serviceId is `auth-provider`&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>curl http://localhost:8888/auth-service/echo/Pixiu
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>result on console :&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#93a1a1;background-color:#002b36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-fallback" data-lang="fallback">&lt;span style="display:flex;">&lt;span>Hello Nacos Discovery Pixiu
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Https Case Introduction</title><link>https://deploy-preview-3203--dubbo.netlify.app/en/overview/reference/pixiu/other/user/samples/https/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://deploy-preview-3203--dubbo.netlify.app/en/overview/reference/pixiu/other/user/samples/https/</guid><description>&lt;p>Welcome to contribute to this document.&lt;/p></description></item></channel></rss>