" /> HELP! HOW TO GET JSON result?? - Genesys CTI User Forum

Author Topic: HELP! HOW TO GET JSON result??  (Read 1838 times)

Offline memo

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
HELP! HOW TO GET JSON result??
« on: July 31, 2019, 04:04:19 AM »
Advertisement
Hi everyone~
when i use composer +tomcat+webrequest,i can get web request result
Ex: i use "AppState.result.MarkCreditCard1" get  MarkCreditCard1 value

but when i used composer+IIS+web request,i can't get web request result,
because web request result become JSON format,
how to get json result?

pic1:this is composer web request
[img width=480 height=480]https://upload.cc/i1/2019/07/31/HPks5B.jpg[/img]

pic2:this is composer log,you can find web request result become JSON format
[img width=640 height=76]https://upload.cc/i1/2019/07/31/NHDCGn.jpg[/img]
« Last Edit: July 31, 2019, 04:21:17 AM by memo »

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: HELP! HOW TO GET JSON result??
« Reply #1 on: July 31, 2019, 04:10:10 AM »
Seems more a problem with your WS, you see a \r\n? Those are not valid characters in a WS call. Maybe JSP was goody and let them go, but Net is more strict as it seems

Offline gen_rtfm

  • Full Member
  • ***
  • Posts: 114
  • Karma: 4
Re: HELP! HOW TO GET JSON result??
« Reply #2 on: July 31, 2019, 05:41:30 AM »
Content type returned from the web service is text/plain - update that if you have control of the web service.

If content type is set to json you might get better results.

Skickat från min F8331 via Tapatalk