Respect BasePath attribute (#44)

This commit is contained in:
Patrick Stevens
2023-12-30 10:24:42 +00:00
committed by GitHub
parent 59be1f1806
commit 0d231c5200
12 changed files with 297 additions and 26 deletions

View File

@@ -9,6 +9,7 @@ open System.Net.Http
open RestEase
[<WoofWare.Myriad.Plugins.HttpClient>]
[<BasePath "https://whatnot.com">]
type IPureGymApi =
[<Get "v1/gyms/">]
abstract GetGyms : ?ct : CancellationToken -> Task<Gym list>
@@ -60,3 +61,8 @@ type IPureGymApi =
[<Get "endpoint">]
abstract GetWithoutAnyReturnCode : ?ct : CancellationToken -> Task<HttpResponseMessage>
[<WoofWare.Myriad.Plugins.HttpClient>]
type IApiWithoutBasePath =
[<Get "endpoint/{param}">]
abstract GetPathParam : [<Path "param">] parameter : string * ?ct : CancellationToken -> Task<string>