-
Notifications
You must be signed in to change notification settings - Fork 0
GET Method
Jan Stefan Gehrmann edited this page Jul 18, 2017
·
3 revisions
GET is a method to request a resource. Any time you fire a GET request you will get the same information as response. This method is save to use bacause you never manipulate resources in any way.
Usage:
//initialize REST client
var client = new REST();
//fire request
client.GET(url,true,function (responseText, statusCode, statusMessage) {
//do something...
});GET method uses three parameters:
- url -> This is the url used as identifier for the requested resource.
- boolean -> This is a flag which decides if the request is actually a-/synchronous.
- callback function -> A function which will be executed after a request was successfully executed. There are several parameters which will be injected into this function. A response text which is the body of the requested resource, a http status code and a status message which could be helpful for visualizing successfully executed requests.