M
mmc
Hi all,
I've been using C# for a long time, but am somewhat new to REST, and
have what I'm sure are real newbie questions:
I want to develop a RESTful Web Service API that will be able to
handle requests of the form
http://mydomain.com/widgets/france --(returns all widgets available
in france)
http://mydomain.com/widget/1234 -- (returns data about widget # 1234)
http://mydomain.com/widget/1234/costInDollars --(returns the price of
widget #1234 in $)
http://mydomain.com/widget?id=1235&name=NewWidget&costUS=25.5&country=Spain
--(creates a new widget with an id of 1235, a name of NewWidget, a
costInDollars of $25.50, and an available-in-country of Spain.
My questions:
1) are these "RESTful calls"? (I'm pretty sure the first 3 are, but
is the last one a reasonable syntax for "add widget"?
2) On the server side, does the HTTP handler simply parse the URL to
retrieve the object type, ID, etc. (and retrieve the QueryString
params normally), or is there a streamlined way to break about the
URL?
Thanks in advance for any help!
I've been using C# for a long time, but am somewhat new to REST, and
have what I'm sure are real newbie questions:
I want to develop a RESTful Web Service API that will be able to
handle requests of the form
http://mydomain.com/widgets/france --(returns all widgets available
in france)
http://mydomain.com/widget/1234 -- (returns data about widget # 1234)
http://mydomain.com/widget/1234/costInDollars --(returns the price of
widget #1234 in $)
http://mydomain.com/widget?id=1235&name=NewWidget&costUS=25.5&country=Spain
--(creates a new widget with an id of 1235, a name of NewWidget, a
costInDollars of $25.50, and an available-in-country of Spain.
My questions:
1) are these "RESTful calls"? (I'm pretty sure the first 3 are, but
is the last one a reasonable syntax for "add widget"?
2) On the server side, does the HTTP handler simply parse the URL to
retrieve the object type, ID, etc. (and retrieve the QueryString
params normally), or is there a streamlined way to break about the
URL?
Thanks in advance for any help!