-
Notifications
You must be signed in to change notification settings - Fork 60
Closed
Labels
Description
Description
It is not possible to specify the full URL (e.g. http://my.awesome.api/) as a parameter.
The reason I need this is because I want to be able to specify both http and https endpoints whenever I want to.
Consider the following code:
[<Literal>]
let private awesomeJsonPath = __SOURCE_DIRECTORY__ + "/awesome.swagger.json"
type AwesomeApi = SwaggerProvider<awesomeJsonPath, "Content-Type=application/json">
let private client = new AwesomeApi("http://my.awesome.api/")
printfn "%A" client.AwesomeValueGet(42)Currently this will crash.
Expected behavior
http/https prefixes are respected and taken into account when the request is constructed
Actual behavior
An unhandled exception of type 'System.Net.WebException' occurred in FSharp.Core.dll
Additional information: The remote name could not be resolved: 'http'
Known workarounds
Use only hostname
Reactions are currently unavailable