NetTalk Central
Toggle navigation
Login
Register
×
Welcome,Guest
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
Web service JSON input
« previous
next »
Print
Pages: [
1
]
Author
Topic: Web service JSON input (Read 4472 times)
RichBowman
Jr. Member
Posts: 76
Web service JSON input
«
on:
May 07, 2018, 05:46:48 AM »
I wish to call a NetTalk web service with a JSON string as the input parameter. I have 2 questions:
1. Do I do a GET or POST?
2. What does the url look like?
Thanks,
Logged
bshields
Sr. Member
Posts: 392
Re: Web service JSON input
«
Reply #1 on:
May 07, 2018, 07:10:39 AM »
Hi Rich,
If its a REST web service then you can usually use either GET or POST. Usually GET if the payload is small.
If your json is large POST is more appropriate as there can be limitations to the size of a URL.
You just stick the json onto the URL, eg:
https://move-api.inhabit.com.au/v1/5/contactlist?fields=
{"fields":["sysid","preferences"]}&filter={"filter":[{"field":"surname","value":"'cooper'","operator":"contains"}]}
Regards
Bill
Logged
Bruce
Global Moderator
Hero Member
Posts: 11250
Re: Web service JSON input
«
Reply #2 on:
May 07, 2018, 07:30:05 AM »
Hi Rich,
Make the Service Method.
Then check out the auto-documented page for the method.
The short answer is that there are _lots_ of ways to call the method. But I'd recommend using the POST with JSON data.
cheers
Bruce
Logged
Print
Pages: [
1
]
« previous
next »
NetTalk Central
»
NetTalk Web Server
»
Web Server - Ask For Help
»
Web service JSON input