<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>utgwkk</author_name>
  <author_url>https://blog.hatena.ne.jp/utgwkk/</author_url>
  <blog_title>私が歌川です</blog_title>
  <blog_url>https://blog.utgw.net/</blog_url>
  <categories>
    <anon>技術</anon>
    <anon>Go</anon>
  </categories>
  <description>req.Header.Set(&quot;X-Hoge&quot;, &quot;fugapiyo&quot;) する http.RoundTripper を実装したらできそう。 実装 全てのリクエストの User-Agent を utagawakiki-bot (+https://twitter.com/utgwkk) に設定する RoudTripper です。こんな感じで http.DefaultClient.Transport に設定したり、お使いの http.Client に挟み込んだりできます。 package main import ( &quot;fmt&quot; &quot;io/ioutil&quot; &quot;log&quot; &quot;net/http&quot; ) func …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fblog.utgw.net%2Fentry%2F2020%2F11%2F29%2F180939&quot; title=&quot;Go言語の http.Client による外部リクエストの全てに独自のヘッダーを付与する - 私が歌川です&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-11-29 18:09:39</published>
  <title>Go言語の http.Client による外部リクエストの全てに独自のヘッダーを付与する</title>
  <type>rich</type>
  <url>https://blog.utgw.net/entry/2020/11/29/180939</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
