Remove content type as default header from fetch request (this should be fetched from dom)

This commit is contained in:
Peter Stockings
2023-12-16 20:03:27 +11:00
parent ab25d557f8
commit 7293801ddd

View File

@@ -33,9 +33,9 @@
<div class=""> <div class="">
<div class="flex mb-3"><input <div class="flex mb-3"><input
class="px-4 py-1.5 w-full border border-gray-300 rounded-md hover:border-orange-500 focus:outline-orange-500" class="px-4 py-1.5 w-full border border-gray-300 rounded-md hover:border-orange-500 focus:outline-orange-500"
placeholder="Key" name="keyItem"><input placeholder="Key" name="keyItem" value="Content-Type"><input
class="ml-3 px-4 py-1.5 w-full border border-gray-300 rounded-md hover:border-orange-500 focus:outline-orange-500" class="ml-3 px-4 py-1.5 w-full border border-gray-300 rounded-md hover:border-orange-500 focus:outline-orange-500"
placeholder="Value" name="valueItem"><button placeholder="Value" name="valueItem" value="application/json"><button
class="ml-4 px-4 rounded-md text-red-500 border border-red-300 hover:bg-red-100">Remove</button> class="ml-4 px-4 rounded-md text-red-500 border border-red-300 hover:bg-red-100">Remove</button>
</div><button </div><button
class="px-6 py-1 rounded-md text-orange-600 border border-orange-400 hover:bg-orange-100">Add</button> class="px-6 py-1 rounded-md text-orange-600 border border-orange-400 hover:bg-orange-100">Add</button>
@@ -113,7 +113,6 @@
method, method,
body, body,
headers: { headers: {
'Content-Type': 'application/json'
} }
}).then(response => { }).then(response => {
response.text().then(text => { response.text().then(text => {