<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>quoll00</author_name>
  <author_url>https://blog.hatena.ne.jp/quoll00/</author_url>
  <blog_title>Carpe Diem</blog_title>
  <blog_url>https://christina04.hatenablog.com/</blog_url>
  <categories>
    <anon>Go</anon>
  </categories>
  <description>概要 開発中にサーバレスポンスの内容を表示したい時があると思いますが クライアントが受け取ったレスポンス サーバが送ったレスポンス のそれぞれをログなどで表示する方法を紹介します。 環境 go 1.14.3 クライアントが受け取ったレスポンスを表示 クライアントでは受け取ったレスポンスはio.ReadCloserです。 なので一度読み込むと以降は読み込めなくなるのでそこだけ注意が必要です。 io.Reader系で実処理ではreadする処理がほぼ必ず入るので、io.TeeReader を使うと良いです。 ref: Goのioパッケージのメソッドを図示 - Carpe Diem</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fchristina04.hatenablog.com%2Fentry%2Fshow-server-response&quot; title=&quot;Go でサーバレスポンスの内容を表示 - Carpe Diem&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/q/quoll00/20200603/20200603013559.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-06-17 04:55:10</published>
  <title>Go でサーバレスポンスの内容を表示</title>
  <type>rich</type>
  <url>https://christina04.hatenablog.com/entry/show-server-response</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
