Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: always uppercase method option #259

Merged
merged 3 commits into from
Aug 16, 2023
Merged

fix: always uppercase method option #259

merged 3 commits into from
Aug 16, 2023

Commits on Aug 1, 2023

  1. feat: uppercase method to support lowercased 'patch'

    // Works
    fetch('https://dummyjson.com/products/1', {
        method: 'PATCH',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ title: 'Test' }),
      })
        .then((res) => res.json())
        .then(console.log)
    
    // Doesn't work
    fetch('https://dummyjson.com/products/1', {
        method: 'patch', // <-- lowercased
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ title: 'Test' }),
      })
        .then((res) => res.json())
        .then(console.log)
    
    // Works
    fetch('https://dummyjson.com/products/1', {
        method: 'put', // <-- also lowercased, but it works
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ title: 'Test' }),
      })
        .then((res) => res.json())
        .then(console.log)
    murisceman authored Aug 1, 2023
    Configuration menu
    Copy the full SHA
    95dd9b7 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2023

  1. Configuration menu
    Copy the full SHA
    3bec743 View commit details
    Browse the repository at this point in the history
  2. always normalize method

    pi0 committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    9460ebf View commit details
    Browse the repository at this point in the history