views:

39

answers:

2

Dear all

I want to create a WCF service that will simply reply back the query string, HTTP headers, and the HTTP verb used in a request it received.

I want to use it to unittest a AJAX enabled JavaScript framework I am building so I can verify that the HTTP headers and HTTP verbs are being set correctly.

Basically I need a way to make the WCF service bind to HTTP GET, POST, PUT, and DELETE, and I need a way to grab all the headers etc. and return them.

Any input is much appreciated, Egil.

+1  A: 

Not sure that it is possible to do exactly what you want to do. But you could come close using REST with WCF, see http://msdn.microsoft.com/en-us/netframework/cc950529.aspx

Shiraz Bhaiji
+1  A: 

It turns out a HTTP handler was an easier way to go than a WCF service. I posted my solution over at my blog: Simple Ping/Reply Service for Unit Testing AJAX/XHR requests. I hope this helps others as well.

Egil Hansen