Toggle navigation
Toggle navigation
This project
Loading...
Sign in
2019-2-OpenSourceSW
/
LINEBOT
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
최원섭
2017-11-27 16:17:38 +0000
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f1d7c66a78f2347caa6614ec9b5928649b1b7972
f1d7c66a
1 parent
f13cec9a
[Develop] Bot Message API
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
server.js
server.js
View file @
f1d7c66
...
...
@@ -16,5 +16,25 @@ app.get('/keyboard', function(req, res) {
}).
send
(
JSON
.
stringify
(
menu
));
});
app
.
post
(
'/message'
,
function
(
req
,
res
)
{
const
_obj
=
{
user_key
:
req
.
body
.
user_key
,
type
:
req
.
body
.
type
,
content
:
req
.
body
.
content
};
console
.
log
(
_obj
.
content
)
let
massage
=
{
"message"
:
{
"text"
:
_obj
.
content
},
};
res
.
set
({
'content-type'
:
'application/json'
}).
send
(
JSON
.
stringify
(
massage
));
});
app
.
listen
(
80
,
function
(){
});
...
...
Please
register
or
login
to post a comment