<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>xoyip</author_name>
  <author_url>https://blog.hatena.ne.jp/xoyip/</author_url>
  <blog_title>ぴよログ</blog_title>
  <blog_url>https://xoyip.hatenablog.com/</blog_url>
  <categories>
    <anon>JSON</anon>
    <anon>Grape</anon>
    <anon>Rails</anon>
    <anon>API</anon>
  </categories>
  <description>先日こんなエントリーを書いた。 Grapeを使ったAPIで独自のエラーコードも一緒に返す工夫 - PILOG その後色々調べているうちに、エラーコードはレスポンスヘッダーに入れたらいいよ～という話を見かけたので、その方針を採るかどうかは別として実現方法を調べてみた。 YappoLogs: 2014年に向けた JSON API の実装の方向性と X-JSON-Status 改め X-API-Status header のご提案 調べたところによるとgem、GrapeにはHTTPヘッダーを追加するインターフェースが用意されているらしい。エラー時にヘッダーを追加するには error! 'Unauth…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxoyip.hatenablog.com%2Fentry%2F2014%2F11%2F17%2F134021&quot; title=&quot;Grapeで独自のレスポンスヘッダーを追加する - ぴよログ&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>http://capture.heartrails.com/150x130/shadow?http://blog.yappo.jp/yappo/archives/000829.html</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2014-11-17 13:40:21</published>
  <title>Grapeで独自のレスポンスヘッダーを追加する</title>
  <type>rich</type>
  <url>https://xoyip.hatenablog.com/entry/2014/11/17/134021</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
