注意
OPTIONS request の役割とか考えてない例
routes.rb
こんなん
Rails.application.routes.draw do
root to: 'roots#main', via: :options
controller
class RootsController < ApplicationController
def main
head 200
end
end
curl で確認
curl -s -v -X OPTIONS http://localhost:3000/
rspec
ちなみに rspec で options のリクエストをする方法がわからんとです。
Original by Github issue
チャットメンバー募集
何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。