kean / Get

Web API client built using async/await
MIT License
943 stars 75 forks source link

#25 Extends host with additional path eg. /hostPath, example url: you… #26

Closed adku closed 2 years ago

adku commented 2 years ago

25 Extends host with additional path eg. /hostPath, example url: yourHost:9009/hostPath/v1/endpointName

Fixes https://github.com/CreateAPI/Get/issues/25

kean commented 2 years ago

I suggest adding a baseURL parameter to replace the existing host, port and isInsecure configuration options:

let baseURL = URL(string: "localhost:9009/yourname")
let absoluteURL = baseURL?.appendingPathComponent("/v1/endpointName")

I think it should cover your scenario and many more.

kean commented 2 years ago

A new baseURL parameter available in Get 0.7.0.