TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
أماني مفيد
NA
142
17.3k
Node js fetch response
Apr 1 2021 9:43 AM
I have this Function , Node js
function
get_type(msg){
try
{
const
tok =
"xxxxxxx"
;
const
uri =
'https://api.wit.ai/message?v=20200513&q='
+ msg;
const
auth =
'Bearer '
+ tok;
fetch(uri, {headers: {Authorization: auth}})
.then(res => res.json())
.then(res => console.log(res ))
}
catch
(error){
}
}
});
I need return Fetch response inside a variable to use it on other function
how i can do that
Reply
Answers (
2
)
Calling stored procedure from node js
EventEmitter in Node.js