vittoriom / RNFPlaceholder

A placeholder project for the work in progress framework RuntimeNetworkFoundation
MIT License
0 stars 0 forks source link

Add operation configuration parameter for success and error HTTP codes #31

Closed vittoriom closed 10 years ago

vittoriom commented 10 years ago

The parameter can also be specified at the endpoint level, and in case the values will be merged, with the operation having priority. Values can be specified as single HTTP codes: success : 200 or as ranges success : 200-300 or as multiple values success: 200,202-205

vittoriom commented 10 years ago

This can also be read as : define an inline response validator based on a convenience class "RNFBasicResponseValidator" that accepts an array with the defined success HTTP status codes. Maybe also add a "RNFYesResponseValidator" that always returns YES.

vittoriom commented 10 years ago

There will be no merge between the endpoint and the operation validators. Response validation should be specified at the endpoint level if status-code based. If for a specific operation the responseValidator is overridden, the latter will be used without querying the endpoint one.