Using webforms, Web, REST and SOAP APIs |
Top Previous Next |
PageGate supports the ability to use HTTP GET and POST methods which can be used to submit web forms, request information from websites and/or WEB APIs and interact with REST APIs.
The website, web form or API you interact with will directly determine what you need to configure in PageGate.
GET and POST are conceptually similar to each other but perform their functions in completely different ways. The GET method carries parameters in the URL string and the POST method carries parameters in the request body. GET can be used to interact with WEB APIs and POST is used to interact with webforms and REST APIs and both can be used to request information from and submit information to them.
As an example, ViaNett (vianett.com) is an SMS delivery service in Europe that provides a Web API to send SMS. This is a sample HTTP GET request to send a message via their Web API: https://smsc.vianett.no/v3/send?username=UsernameValue&password=PasswordValue&msgid=1234&tel=4711111111&msg=Hello+World&pricegroup=300&campaignid=12345
As you can see, all variables are declared as part of the URL. If you need to reference JSON, XML or something similar, you'll want to use the POST method.
Web APIs, REST APIs and webforms all have different requirements for the headers and contents they need to see.
Web forms you interact with, whether it be PHP, CGI or something else, will have certain parameters that determine whether you're requesting or submitting data and you'll need to know each required parameter and the value that should be passed in it.
Some APIs want the body in JSON format, others want XML, others will accept both and leave it to the end user to determine which they want to use.
It's important to gather as much information as you can about what API or webform you're interacting with and their documentation will typically provide required variables and how they need to be implemented. |