Answers for "fetch headers x-www-form-urlencoded"

0

fetch x-www-form-urlencoded

fetch('https://example.com/login', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/x-www-form-urlencoded'
  },
  body: new URLSearchParams({
    'param': 'Some value',
    'another_param': 'Another value'
  })
})
  .then(res => {
    // Do stuff with the result
  });
Posted by: Guest on June-27-2021

Code answers related to "fetch headers x-www-form-urlencoded"

Browse Popular Code Answers by Language