T.Rest.RessourceFactory

Methods

Init Initialize your factory with the delegates you want to be invoked when the ressource's ValidateSignature is called

Create

Create a Ressource object ready to call a specific REST ressource

 


 

T.Rest.RestConfiguration properties

Host Example: api.google.com.
QueryString Example: name=foo&bar=1
Url Example: /person/123321
Method Example: "POST". Default is "GET"
UseSSL Should the service be invoked using SSL? Default is false
ExpectArrayResult Do you expect the service to return an array of objects? Default is false
ExpectedObjectSignature What signature do you expect the service to return?
Authorization T.REST supports HTTP Basic Authentication so if your service requires authentication you can add a username and a password to your service call

 


 

You can declare the following configuration properties in app.config

Host

Example: <appSetting key="host" value="api.google.com" />.

If declared you do not have to explicitly declare the Host property of your RestConfiguration object

HttpsEnabled

Example: <appSetting key="HttpsEnabled" value="true" />.

Values can be either 'true' or 'false'. With this setting you can force the call against the REST ressource to use port 80 even though UseSSL is set to 'true' in the ressource's configuration. This feature is useful if you have the same test running i.e. locally on your development machine (which does not have an SSL certificate) and against your staging environment with SSL certificates installed. In this scenario you use this setting as an override-switch to run everything against port 80 while the same tests run by your CI environment (and it's own dedicated app.config) should respect the UseSSL configuration property.

Last edited Oct 17, 2012 at 7:54 PM by kerbou, version 11

Comments

No comments yet.