REST Service Examples
Home
|
These examples demonstrate a simple REST service that can be invoked directly via URL. The examples below output JSON and XML. Note that for most browsers JSON content will download rather than display in the browser. If you're running FireFox I recommend you install the
JsonView plug-in
to directly view JSON content in FireFox. For IE you can
hack the registry
to display JSON as text in the browser.
Retrieve a single Stock Quote as Rest Data
Raw Urls:
http://www.dotnetcentral.net/WestWindWebToolkit/Samples/Rest/StockService.ashx?method=GetStockQuote&symbol=msft
http://www.dotnetcentral.net/WestWindWebToolkit/Samples/Rest/StockService.ashx?method=GetStockQuote&symbol=gld&format=xml
Clean Routed Urls:
http://www.dotnetcentral.net/WestWindWebToolkit/Samples/stockquote/intc
http://www.dotnetcentral.net/WestWindWebToolkit/Samples/stockquote/slw?format=xml
Retrieve a set of Stock Quotes as Rest Data
Raw Urls:
http://www.dotnetcentral.net/WestWindWebToolkit/Samples/Rest/StockService.ashx?Method=GetStockQuotes?symbolList=msft,intc,gld,slw,mwe
http://www.dotnetcentral.net/WestWindWebToolkit/Samples/Rest/StockService.ashx?Method=GetStockQuotes?symbolList=msft,intc,gld,slw,mwe&format=xml
Clean Routed Urls:
http://www.dotnetcentral.net/WestWindWebToolkit/Samples/stockquotes/msft,intc,gld,slw,mwe
http://www.dotnetcentral.net/WestWindWebToolkit/Samples/stockquotes/msft,intc,gld,slw,mwe?format=xml
Retrieve Stock History as a an graphic Chart
Raw Urls:
http://www.dotnetcentral.net/WestWindWebToolkit/Samples/Rest/StockService.ashx?Method=GetStockHistoryGraph&symbolList=msft,intc,gld,slw,mwe
Clean Routed Urls:
http://www.dotnetcentral.net/WestWindWebToolkit/Samples/stockhistor/msft,intc,gld,slw,mwe