Skip to main content


Showing posts from September, 2012

How to send request from CURL command tool to wcf reset service

In this post,I will show you how to test your rest service from command prompt using CURL tool. What is CURL:A command line tool for getting or sending files using URL syntax.For this demo I have created a simple reset service which contains three method as belowDownload Source Code[ICurlService]using System;using System.Collections.Generic; using System.Linq; using System.Runtime.Serialization; using System.ServiceModel; using System.ServiceModel.Web; using System.Text; [ServiceContract(SessionMode = SessionMode.NotAllowed)] publicinterface ICurlService { [WebGet(UriTemplate = "date/{year}/{month}/{day}", ResponseFormat = WebMessageFormat.Xml)] [OperationContract] string GetDate(string day, string month, string year); [WebGet(UriTemplate = "greet", ResponseFormat = WebMessageFormat.Json)] [OperationContract] string Greeting(); [WebInvoke(Method = "POST", UriTemplate = "submit", BodyStyle = WebMessageBodyStyle.Wra…