To read from any webservice/rest as a client, just use below code to call any existing endpoint with http handler.
from java.util import HashMap,Calendar
from com.ibm.json.java import JSONObject
response=service.invokeEndpoint("SURVEY-endpoint name",map,body1)
body = JSONObject.parse(response)
mbo.setValue("description",response[:200])
#mbo.setValue("description",body.get("data")[1].get("email"))
Hi. Can you give an example of what is the value of map and body1 in the parameter for service.invokeEndpoint?
ReplyDeletehow can i add basic authorization to API call ?
ReplyDelete