エントリーの編集
エントリーの編集は全ユーザーに共通の機能です。
必ずガイドラインを一読の上ご利用ください。
Sending custom headers through RSpec
記事へのコメント0件
- 注目コメント
- 新着コメント
このエントリーにコメントしてみましょう。
注目コメント算出アルゴリズムの一部にLINEヤフー株式会社の「建設的コメント順位付けモデルAPI」を使用しています
- バナー広告なし
- ミュート機能あり
- ダークモード搭載
関連記事
Sending custom headers through RSpec
Given my API consumers are required to send a customer HTTP header like this: # curl -H 'X-SomeHe... Given my API consumers are required to send a customer HTTP header like this: # curl -H 'X-SomeHeader: 123' http://127.0.0.1:3000/api/api_call.json Then I can read this header in a before_filter method like this: # app/controllers/api_controller.rb class ApiController < ApplicationController before_filter :log_request private def log_request logger.debug "Header: #{request.env['HTTP_X_SOMEHEADER']

