Thursday, August 28, 2014

Test LightSwitch OData services with Fiddler v 2.4.x

Make a visual Studio 2013 Lightswitch app based on the Northwind SQL database.

Application name: NorthwindLS

Data Source: NorthwindData

The Lightswitch app is published to an IIS server ‘myhost’

Normally the media format of the OData will be ‘atom’.

To show result in JSON format with Fiddler

Start Fiddler v 2.4.x

In the composer tab next to the GET command, enter the URL of the Odata service published by the Lightswitch app: http://myhost/NorthwindLS/NorthwindData.svc

In the textbox under the GET command, there are 2 lines of text that are sent to the server

User-Agent: Fiddler
Host: myhost

Add a 3rd line: Accept: application/json;odata=verbose

image

click the Execute button to execute the Get command. The response will be in JSON format.

No comments: