Skip to content

Latest commit

 

History

History
29 lines (16 loc) · 1.07 KB

README.md

File metadata and controls

29 lines (16 loc) · 1.07 KB

RestfulWCFSample

A simple sample WCF service that has a REST endpoint.

When run with IIS Express, you can hit it similar to this: (note, port may vary) http://localhost:59843/SampleService.svc/GetSomeData?param1=Hello%20Web

Which will return : "You sent 'Hello Web'"

If you attempt to hit the PostSomeData endpoint from the web browser (which would use an HTTP Get operation), it won't work! http://localhost:59843/SampleService.svc/PostSomeData?param1=Input&param2=OtherInput Method not allowed.

Alternatively, you can use a rest client like Postman to interact with the service.

You can do an HTTP Get:

Postman Http Get

An HTTP Post with query string parameters:

Postman Query String

Or an HTTP Post with the content in the request body:

Postman body content