logo

NJP

I'm tired of ReST Part II - The REST Plugin

Import · Apr 28, 2012 · article

Attached is the REST Plugin I promised early this morning. I have not implemented the DELETE and PUT functionality yet, but GET and POST work. This is a v1.0 release, so before the hate mail starts coming in, I am offering this update set as a good will offering to the community. For those of you that know me, I love the open source model. Sharing information and knowledge is how we progress. With that said, if anyone has any improvements please let me know. I have spotted several issues already, so expect a new version in the future. For those of you that want to get your hands dirty have a go at it.After the update set is applied you will see a Rest Message module (very similar to and located under the SOAP Message module). This module was designed to work very similar to the SOAP Message when incorporating it in other scripts. I didn't want to shift paradigms since most of us are already familiar with how SOAP Message functions. Here are the steps for sending your first Restful Http Get request:Step 1: Click on the ReST Message module in the left navigationStep 2: Click the New button at the top of the formStep 3: Add this data to the form -

Name Stock Quote Get

Base URL http://www.webservicex.net/stockquote.asmx

Service URL http://www.webservicex.net/stockquote.asmx/GetQuote

Port 80

Request Type GETStep 4: Click New in the Rest Message Parameters Related ListStep 5: Add this data to the Rest Message Parameters form

Name symbol

Value IBMStep 6: Click UpdateStep 7: Click "Test" in the Related Links sectionResults:You will see the GET request and the XML response for that given HTTP request.Post will follow the same steps. The only difference is you will not see a request for the POST, but the XML response will populate the REST Message Test list.

That is all I have for the community this week. I'm going to go catch some rays in this beautiful weather I am having. Cheers.

View original source

https://www.servicenow.com/community/in-other-news/i-m-tired-of-rest-part-ii-the-rest-plugin/ba-p/2279717