Open calvinbrown085 opened 6 years ago
String-concatting URL construction is definitely not ideal, I agree. http4s was added as an experimental alternate client generation, unfortunately without the server component, preventing writing round-trip tests.
@blast-hardcheese I talked to a couple people with differing opinions on this, some say unsafe from string might be okay in compiled code.
Still, if there's a safe way to build a URI, there's no reason to not use it. There isn't one in akka-land, and I didn't want the middleware to become huge.
Yep, that totally makes sense
It's pretty well known in the http4s community to stay way from
Uri.unsafeFromString
httpClient.expect[GetConfigurationResponse](Request[F](method = Method.POST, uri = Uri.unsafeFromString(host + basePath + "/get-configuration")
We should be able to do this in a safe way.