익스프레스 게시 api 예제

코드 예제

4
0

노드 익스프레스 post 요청 json

var express = require('express');

var app = express();

app.use(express.json()); // built-in middleware for express

app.post('/', function(request, response){
 	let myJson = request.body;      // your JSON
	let myValue = request.body.myKey;	// a value from your JSON
	response.send(myJson);	 // echo the result back
});

app.listen(3000);
0
0

익스프레스 post 메소드

fetch('',{
	method:'POST',
  	headers:{
    	'content-type': 'application/json'
    },
  	body:JSON.stringify(users)
})
.then(res=> res.json())
.then(data => console.log(data))
0
0

보내는 방법에 응답 express js

(req, res) => res.send('Hello World!')
//Use end() to send an empty response
res.end()
res.status(404).end()// for not found pages
//use either
//res.status(404).send('File not found') === res.sendStatus(404)

다른 언어로

이 페이지는 다른 언어로되어 있습니다

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................