VBBRett
asked on
JQuery RESTful GET an object
I am looking for a way to get data from a url. The url is a RESTful service and it is posting information about an employee. The URL accepts one parameter, the employee id. So knowing that, how would I build the Jquery so that it could pull that record and be able to parse the information to the text fields on a page. SO in essence, the url could be http://employeeinfo/empid?=111
It would parse the following information once it pulls the RESTful call:
Employee ID
Employee First Name
Employee Last Name
Employee Department ID
Employee Street Address
Employee Zip code
Employee State
Employee Phone Number
It would parse the following information once it pulls the RESTful call:
Employee ID
Employee First Name
Employee Last Name
Employee Department ID
Employee Street Address
Employee Zip code
Employee State
Employee Phone Number
Do you want to create a web service or to consume it? In the second case it depends on the return value. When it's already JSON then you don't need to parse anything, cause you can use it directly.
ASKER
Let's just say the Web Service will be a black box with functionality and in my case, I really don't know what it is doing, I just need to know how to pull the data using a url with the requirements I spelled out above. So in my case, all I need to know is how to connect to the RESTful service URL using JQuery, making it an object and then parsing each property into a text field on a theoretical page. Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.