Git Product home page Git Product logo

Comments (3)

alexanderson1993 avatar alexanderson1993 commented on September 27, 2024 1

So you could argue that non-standard method behavior belongs at the server level outside of Remix since Remix will never be able to leverage it.

I basically convinced myself of this as I wrote the issue 😅

I'll leave it to you and the team whether you want to implement this or not, but now you've got something concrete you can point people towards when they ask why resource routes don't support non-standard HTTP methods.

from react-router.

brophdawg11 avatar brophdawg11 commented on September 27, 2024

Whether it handles the request through the loader or action is an open question

It looks like these new ones have fairly well defined semantics - https://www.ibm.com/docs/en/i/7.5?topic=concepts-webdav seems to indicate PROPFIND might be the only non-mutating one.

However, if we implement this, I want to avoid having to continually update the list of methods in the future as new ones might come around, so I would probably vote for a looser implementation of:

  • Resource routes accept any method
  • We send any unknown methods (i.e., not included in this list) to the action and make no assumptions about whether or not it mutates anything

I'm still not convinced we should implement this though :). Resource routes are API routes that play nicely within the Remix data patterns. They can be hit from fetchers, use client loaders, leverage single fetch, etc. A Remix request (from a fetcher or useSubmit) will never send one of those non-standard methods. So you could argue that non-standard method behavior belongs at the server level outside of Remix since Remix will never be able to leverage it.

from react-router.

brophdawg11 avatar brophdawg11 commented on September 27, 2024

ok cool - I'm going to close this out for now. AFAIK this was the first time that limitation came up so it's not a high-demand thing - if it ever becomes a higher requested issue we can certainly revisit. Thanks for taking the time to dig in!

from react-router.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.