What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-08 11:26:12
uploading file with fetch
const handleImageUpload = event => { const files = event.target.files const formData = new FormData() formData.append('myFile', files[0]) fetch('/saveImage', { method: 'POST', body: formData }) .then(response => response.json())... Add solution -
C 2021-11-02 17:56:07
Writing tests for API requests
pm.test("Request is successful with a status code of 200", function () { pm.response.to.have.status(200); }); pm.test("Check that it returns an array", function () { var jsonData = pm.response.json(); pm.expect(jsonData).to.be.a... Add solution -
Javascript 2021-11-01 19:08:15
fetch api template
//fetch api template const fetchData=(inputs)=>{ fetch('https://example.com/api', { method: 'post', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(inputs) }) .then(function(response) { return response.json(); ... Add solution
Best helpers
Ranking is empty