payload


NodeRED & IBM Watson: How do I insert Watson's response {{payload}} into my index.html?


I have uploaded an index.html and css folder to project.mybluemix.net
In NodeRED, Watson's output prints as {{payload}} to a /results page.
I want my results to print to the existing index.html page without overriding the file.
How would I merge the two?
Cheers,
You are missing the call to the Watson service, but other than that, yes that is all that you need to do. The first time you open your application page the browser will issue a HTTP GET. You application should respond to that get with a web page. You use a template to build the web page.
<HTTP Input - GET> --> <Template> --> <HTTP Output>
If you are calling a Watson service, say Natural Language Classifier, then you need a piece of text that you want to classify, and a classifier that you want to use to classify the text. You will also need some credentials to be able to use the Watson service.
So your web page should provide a mechanism for the text to be either entered or determined. That would come in either as a POST or a GET - its your choice. Your application determines the text, calls the Watson service, then passes the response from the service to a template which returns a response webpage.
<HTTP Input - GET or POST> --> <Function> --> <Watson Service> --> <Template> --> <HTTP Output>
If you know how to write templates then you could consider combining the templates into one template, and make the HTTP Input the same. You would need application logic, in the form of a function or a switch or a change to help determine whether you have enough information to call the Watson Service, and what the template should display.
Before you try this, get comfortable with templates and writing application logic in node-RED.

Related Links

Msfvenom format specifier
NodeRED & IBM Watson: How do I insert Watson's response {{payload}} into my index.html?
Custom Payload Kali Linux

Categories

HOME
xml
api
awk
rdbms
formal-languages
components
bitbucket-api
static-site
telegram-bot
bookmarks
elasticsearch-5
spin
arangodb
fabric.io
owin
octave
java.util.logging
google-form
gkturnbasedmatch
gource
3nf
heat
searchview
symfony-2.8
ag
dataflow-diagram
parcelable
aggregation
jquery-callback
xunit
slidetoggle
mat
8051
exchangewebservices
iis-express
playstation-portable
android-maps-extensions
joomla2.5
getpixel
hunspell
processwire
lubridate
jpad
cin
typesafe-config
trigonometry
android-softkeyboard
android-exoplayer
apache-directory
magento-2.0.7
openrasta
user-defined-fields
zenhub
static-cast
opengl-4
mach-o
restore
testrail
mapxtreme
omxplayer
macaulay2
observablecollection
tracker-enabled-dbcontext
query-by-example
blitline
grgit
rewrite
google-books
video-player
ansi
entity-framework-4.3
dbaccess
showdialog
post-commit-hook
easyrtc
formview
encryption-asymmetric
with-statement
build-script
jjaql
qscrollarea
modular
beaker-testing
ui-select2
insert-id
wimax
uimanageddocument
veracity
saleslogix
subproject
floating-point-exceptions
box2d-iphone
google-maps-mobile
twitterizer
presentation-layer
metaweblog
timertask
undefined-index
ajax-polling
hbm2java
web-garden
openfaces
spread
purepdf
dsl-tools
product-management

Resources

Encrypt Message