Closed AnthonySteele closed 10 years ago
Can't see any reason why we shouldn't merge this straight away.
Apologies, as I could prob find this out myself :-), but it is just adding the .UsingBaseUri(IBaseUriProvider)
method along with a couple of out of the box implementations of IBaseUrlProvider
?
if so - looks great.
Yes, that's it.
And the baseUrlProvider is called in RouteParamsSubstitutor line 32 onwards
The "default" implementation does what was done before - select either the secure or regular url from IApiUri
The test that shows you how to override the default is here
:sunglasses: :satisfied:
Simpler take on https://github.com/7digital/SevenDigital.Api.Wrapper/pull/186
A toolkit to address https://github.com/7digital/SevenDigital.Api.Wrapper/issues/36 - "Enable using different API urls for each endpoint"
Removed it from the endpoint DTO, - is not going to be useful as the DTO will usually come in a library & the caller will be wanting to modify the base uri after the fact using
Api.WithBaseUri(....
This makes RouteParamsSubstitutor simpler as well - it just delegates the base uri to whichever BaseUriProvider is in use. The default BaseUriProvider does the logic of selecting secure or regular api uri