Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

Get Error

Uncaught (in promise) TypeError: Request constructor: HEAD or GET Request cannot have a body.
What's wrong?


let g = await minos.get("/get", {json:{name:"NAME GET"}}).json();
console.log(g.name);
 

router.get("/get", async function(req, res, next)
{
	res.json({name: "GET WORKS"+req.body.name});
	
	
})
{} get cannot send data with body (the {} part)
req.body.name cannot exist in get.

Comment

PREVIOUS NEXT
Code Example
Javascript :: convert array to conventional array js 
Javascript :: what is prototype-based in javascreipt 
Javascript :: List content on thee currentwdr 
Javascript :: unexpected text node: . a text node cannot be a child of a <view. 
Javascript :: save input local storage react 
Javascript :: broken image 
Javascript :: Sorting Array of String, Numbers or Objects in javascript 
Javascript :: regex remove whitespace 
Javascript :: remove the bottom selection line from materail ui 
Javascript :: angular routing appcomponent snipped 
Javascript :: Is It Negative Zero (-0)? js 
Javascript :: prisma.db yaml 
Javascript :: how to create session cookie in node js 
Javascript :: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile 
Javascript :: addeve 
Javascript :: how to get multiple values from json array using jq 
Javascript :: how to get first and last 
Javascript :: lookup objects 
Javascript :: add function 
Javascript :: react native time set state 
Javascript :: jquery on mouseover and mouseout 
Javascript :: sample asynchronous 
Javascript :: angular universal prerender 
Javascript :: javascript axios response.data.pipe not a function 
Javascript :: how to know the number of eventlisteners in javascript 
Javascript :: How to call keyup function on textbox for every dynamic generated form in Angular8 
Javascript :: how to set a condition so that between the first and second mouse clicks there was a delay not 500mls 
Javascript :: wrapping a span tag with an a tag with a href target same as the text of the span 
Javascript :: Store input values in array javascript 
Javascript :: select the value of dropdownMenu with Semantic ui react 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =