Logo

Programming-Idioms

History of Idiom 183 > diff from v5 to v6

Edit summary for version 6 by moodycomputer:
New JS implementation by user [moodycomputer]

Version 5

2019-09-26, 16:36:39

Version 6

2019-09-26, 18:24:55

Idiom #183 Make HTTP PUT request

Make a HTTP request with method PUT to URL u

Idiom #183 Make HTTP PUT request

Make a HTTP request with method PUT to URL u

Code
fetch(u, {
        method: "PUT",
	body: JSON.stringify(data)
})
Doc URL
https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch#Uploading_JSON_data