Horje
fecth post json Code Example
fecth post json
(async () => {
  const rawResponse = await fetch('https://httpbin.org/post', {
    method: 'POST',
    headers: {
      'Accept': 'application/json',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({a: 1, b: 'Textual content'})
  });
  const content = await rawResponse.json();

  console.log(content);
})();
fetch post js
var myHeaders = new Headers();

var myInit = { method: 'POST',
               headers: myHeaders,
               mode: 'cors',
               cache: 'default' };

fetch('flowers.jpg',myInit)
.then(function(response) {
  return response.blob();
})
.then(function(myBlob) {
  var objectURL = URL.createObjectURL(myBlob);
  myImage.src = objectURL;
});





Javascript

Related
jquery wait n seconds Code Example jquery wait n seconds Code Example
remove special characters from string javascript Code Example remove special characters from string javascript Code Example
city regex pattern Code Example city regex pattern Code Example
JS Fetch API Post Request Code Example JS Fetch API Post Request Code Example
email regex javscript Code Example email regex javscript Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11