functions/test/http/cors_test.rb
##
# Make a simple OPTIONS request, for passing to a function test.
#
# @param url [URI,String] The URL to get.
# @return [Rack::Request]
#
Make a simple OPTIONS request, for passing to a function test.
Make a simple OPTIONS request for passing to a function test .
def make_options_request url, headers = []
  env = ::FunctionsFramework::Testing.build_standard_env URI(url), headers
  env[::Rack::REQUEST_METHOD] = ::Rack::OPTIONS
  ::Rack::Request.new env
end
def make_options_request url , headers = [ ] env = :: FunctionsFramework :: Testing . build_standard_env URI ( url ) , headers env [ :: Rack :: REQUEST_METHOD ] = :: Rack :: OPTIONS :: Rack :: Request . new env end
Make a simple OPTIONS request, for passing to a function test.
Make a simple OPTIONS request for passing to a function test .
None
Rack::Request
url
The URL to get.
The URL to get .
headers
<not_specific>