Support @http options functions
See original GitHub issueDescribe the issue
Today, one cannot create a function to handle HTTP options
preflight requests; those instead wind up falling back to get /
to be handled for all endpoints.
That’s probably fine for many cases, but likely anyone being mindful of how they handle CORS preflight requests will want to set up an actual proper options
endpoint.
It’d probably look like this:
@http
get /foo # src/http/get-foo
put /foo # src/http/put-foo
options /foo # [new!] src/http/options-foo
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:11 (4 by maintainers)
Top Results From Across the Web
OPTIONS - HTTP - MDN Web Docs
The HTTP OPTIONS method requests permitted communication options for a given URL or server. A client can specify a URL with this method, ......
Read more >What is HTTP OPTIONS Method? - ReqBin
The HTTP OPTIONS method is used to describe communication options for the target resource. For example, browsers send an HTTP OPTIONS ...
Read more >How to support HTTP OPTIONS verb in ASP.NET MVC ...
We do this to allow the OPTIONS http verb public class BaseApiController : ApiController { public HttpResponseMessage Options() { return new ...
Read more >HTTP/1.1: Method Definitions
The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI.
Read more >Write HTTP functions | Cloud Functions Documentation
HTTP functions accept the HTTP request methods listed on the page HTTP triggers. Your HTTP handler can inspect the request method and perform...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
ok, will do.
Yeah. I’ve made a couple small edits, but I’d like to get a better grip on things and then start contributing more. In any case, hopefully some of the discussion here will help folks that DuckDuckGo it.