-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration
Hassan F edited this page Feb 6, 2021
·
2 revisions
ARH provides few constructor in which they may take several optional argument or a model of parameters as an input. These optional parameters that you may either use directly or within the provided model, are introduced here:
-
baseUrl: This option set a base URL for all other requests -
fixEndOfUrl: This option try to handle missing or extra/at the end of base URL route, so if someone who doesn't know your request URL tries to add a new URL to your config files, it will handle that. -
options: This take an instance ofRestHandlerInitializerOptionswhich provides with: -
-
FixEndOfUrl: This option try to handle missing or extra/at the end of base URL route, so if someone who doesn't know your request URL tries to add a new URL to your config files, it will handle that.
-
-
-
Timeout: Let you set a timeout that overridesHttpClientdefault timeout setting
-
E.g. 1:
var client1 = new AdvancedRestHandler()E.g. 2:
var client2 = new AdvancedRestHandler("https://my-base-url/", true);E.g. 3:
var client3 = new AdvancedRestHandler("https://my-base-url/", new RestHandlerInitializerOptions{
FixEndOfUrl = true
});