wanna see all scripts? :) Script 1 4:42 GET (Hello world) Script 2 7:27 GET (query params) Script 3 11:25 GET (path params) Script 4 14:35 POST (request body payload) Script 5 18:25 POST (request body payload + response body payload) btw - thanks Chuck, great work!
@williammadisondavis5 жыл бұрын
Thank you for the HUGE contribution to everyone attempting to learn this massive application! So helpful, informative and easy to follow.
@ChuckTomasi5 жыл бұрын
You are very welcome Will. Thanks for watching!
@jerryjohn2574 жыл бұрын
Chuck I like the way you present the content . You are an exceptional talent . GOD BLESS
@ChuckTomasi4 жыл бұрын
Thank you J J. I'm glad you enjoyed it.
@anilkumarmohanty20773 жыл бұрын
Excellent one Chuck...Very well explained
@bernarda.moralesnicola77994 жыл бұрын
Very "FUN" video. Thanks !!!
@devs08105 жыл бұрын
Thanks Chuck.. The entire tutorial is pure Gold..
@amirmohamed4670 Жыл бұрын
Hi Chuck, Many thanks for your effort. I have a question. Why did we use here the dot notation method instead of getValue that you suggested that it's the best way to get the value of a record ? var isActiveQuery = queryParams.getValue("active");
@ChuckTomasi Жыл бұрын
Excellent question. getValue() is a method available to GlideRecord objects. queryParams is not a GlideRecord, therefore we cannot use getValue(). If you try it, you'll get an error stating that the system doesn't know what getValue() is.
@amirmohamed4670 Жыл бұрын
@@ChuckTomasi Oh my bad. Thank you for the clarification. I really appreciate your efforts.
@karuna1285 жыл бұрын
very well done chuck. Appreciate your effort
@ChuckTomasi5 жыл бұрын
Thank you!
@SoorajSinghBaghel5 жыл бұрын
Thanks a lot Chuck
@ChuckTomasi5 жыл бұрын
You are welcome.
@jjp56195 жыл бұрын
Very helpful. I have been looking for something like this!!
@ChuckTomasi5 жыл бұрын
Thank you. I'm glad you found it useful
@Freak512 Жыл бұрын
I didn’t understood what is queryparms
@meryemLux4 жыл бұрын
Very informative! Thanks^^
@ChuckTomasi4 жыл бұрын
You are welcome. Thank you for watching.
@Hash103044 жыл бұрын
is it any standard to use "body.data" for defining POST variables? and queryParams = request.queryParams; GET method variables. why we are defining them in different way
@ChuckTomasi4 жыл бұрын
While I don't have a definitive answer from the product managers, my inner developer says "path parameters and query parameters are both part of the URI, so the similarity there makes sense. You have simple key=value pairs for each. POST methods have a body that can be a complex object such as an array of objects. These are addressed as request.body, with the payload of the request body in the data object to handle these more complex data types." Just out of curiosity, if you were to create it, what would you have done?
@sttpt4 жыл бұрын
Very helpful...Thanks....
@ChuckTomasi4 жыл бұрын
You are very welcome. Thanks for watching.
@HumaAzIman3 жыл бұрын
Very Helpful.
@detlefbiedermann71744 жыл бұрын
Hello, great tutorial, many thanks, one question: script 5 does not change the result when I: var answer = {}; answer.status = "OK"; answer.author = "system"; answer.item = {"name" : "Rome", "owner" : "Chuck Tomasi", "count" : 12}; answer.active = true; //response.setBody(answer); //return response; return answer; So the "setBody()" command seams not to be necessary ?
@ChuckTomasi4 жыл бұрын
I have found that using response.setBody() makes it easier to read later "Hey, this is the object I am sending back". returning an objection is implicit and possibly confusing. Additionally, best practice suggests using getters and setters to avoid inferred things happening or missing things that the API can provide.
@janakiramanss62145 жыл бұрын
Hey how to call a external api inside Ajax call
@ChuckTomasi5 жыл бұрын
Can you give me some specifics of what you are trying to do?