Giter Club home page Giter Club logo

Comments (5)

sergiodxa avatar sergiodxa commented on May 27, 2024

This is expected, when you do a redirect after a POST, the browser sends a new GET to the target location, so any response body sent by the POST is lost.

from remix.

lifeiscontent avatar lifeiscontent commented on May 27, 2024

@sergiodxa it seems 307 doesn't work correctly either. https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307

I've updated accordingly

from remix.

brophdawg11 avatar brophdawg11 commented on May 27, 2024

You're losing the ?index query param when you do Location: url.pathname so the POST that is re-sent is trying to hit the root route action and there isn't one, so you're getting a 405. If you need to re-POSt to the same action you'll need to append ?index to your Location header (and then avoid redirect loops in some way 😉 ).

from remix.

lifeiscontent avatar lifeiscontent commented on May 27, 2024

@brophdawg11 @sergiodxa I guess what I'm wondering is how I could potentially achieve something like this as highlighted by @ryanflorence in roadmap 8. https://youtu.be/fHel4d-It5Q?list=PLXoynULbYuEDR_w8LJKRIkGheWpFfiMiR&t=757 while retaining the state of the submission if this is even a reasonable expectation?

from remix.

brophdawg11 avatar brophdawg11 commented on May 27, 2024

That video is mostly talking in hypotheticals - could you outline exactly the UX you're trying to achieve so we're on the same page? 303 redirects are not intended to preserve the submission body, while 307/308's are intended to preserve the submission body.

from remix.

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.