FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Request Query method replaced by Request Method warning. Result in 500 status code · Issue #26 · gitpod-samples/full-stack-web-development · GitHub

Repository navigation

Request Query method replaced by Request Method warning. Result in 500 status code #26

Description

Bug description

500

Error: request.query has been replaced by request.url.searchParams
seems like the hooks doesn't need validation because when i'm delete the if validation, it works normal

work flawlessly and has the same result to delete items :

Steps to reproduce

Create handle hooks in new kit package with validation :

if (request.query.has("_method")) {
    request.method = request.query.get("_method").toUpperCase();
}

got 500 status code

Expected behavior

work normal even if with validation :

import type { Handle } from "@sveltejs/kit";

export const handle: Handle = async ({ request, resolve }) => {
  if (request.query.has("_method")) {
    request.method = request.query.get("_method").toUpperCase();
  }

  const response = await resolve(request);
  return response;
};

Example repository

No response

Anything else?

No response

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL