Contents tagged with REST
-
“MUrl” and “MService”, two new DSLs for REST services
Doug Purdy and Chris Sells announced today in the mix the availability of two new DSLs for RESTful services. MUrl for defining RESTful clients, and MService for defining the service implementation.
-
Negotiating SAML tokens for REST clients with the HttpClient class
Continuing my post “Brokered authentication for REST active clients”, I will show today how the client code can be simplified using the new HttpClient (WCF REST Starter kit 2) and some custom http processing stages attached to its pipeline.
-
PollingAgent and AtomPubClient in the WCF Rest Starter kit preview 2
PollingAgent is an utility class for consuming REST services that implement conditional gets. An instance of this class will periodically invoke the service within a predefined interval of time, and fire an event on the client side when a new response is available to consume. It is internally layered on top of the HttpClient class, so all the pipeline infrastructure provided by this last one is also supported for this pooling agent.
-
HttpClient in the WCF REST Starter Kit Preview 2
HttpClient is a new utility class introduced in the WCF REST Startert Kit Preview 2 for consuming REST services. This new class is made up of three different parts,
-
Brokered authentication for REST active clients with SAML
I have been thinking for a while about what could be a good way to support brokered authentication for active REST clients. Something I did not want to do was to force the use of WS-Trust Active profile, which is in essence SOAP based.
-
Some issues added in codeplex for the WCF REST Starter kit
I just created some issues in codeplex for the features I discussed last week in these two posts:
-
Testing WCF REST Services
Many of the WCF services that we build today rely on the WCF context (OperationContext and WebOperationContext) for performing different things, specially REST services where the context is necessary for settings and getting Http status codes or headers. The fact that the WCF context does not expose interfaces or base classes complicates the unit testing a lot. In this sense, I like the approach taken by the ASP.NET MVC team, all the classes exposed by the HttpContext as properties are base classes, so they can be easily mocked.
In order to test a WCF service with what we have today, we have to either test the service as a black box (integration tests, which requires a lot of plumbing code to setup all the WCF infrastructure for the test, channels, host, client, etc) or create some wrappers to encapsulate the WCF context behavior, as I mentioned in this post "Unit tests for WCF services" -
Adding Conditional Get Support to the WCF REST Starter kit
Some weeks ago, I discussed how important "Conditional Get" can be for some scenarios, specially when we want to make a better use of the network traffic.
-
Dynamic Content Type - A nice to have feature for the WCF REST Starter Kit
One of the missing features in the WCF web model is the ability to have a single operation definition and switch the content type for the response according to some runtime setting (Which could be the Accept or Content-Type request header for instance).
-
My durable WCF RESTful calculator
A durable service in WCF is by a definition a service that can persist all its internal state across calls in some durable storage. For every operation, the service state is retrieved from the storage, the operation is executed and finally the state is persisted again in the storage. Therefore, there is not need to keep the service instance idle in memory while waiting for client calls. It is equivalent to a long run session, which make this feature something ideal for long-running processes like workflows (In fact, workflow services are mount on top of this feature),