Hi All,
I am developing a simple HTTP client program for Linux using the async-http-client package from the server working group. I am able to build locally on macOS, but I was getting a compiler error in my CI pipeline build stage which uses the swift:5.10.1 Docker image.
I found a similar discussion here on the forum that mentioned needing NIOFoundationCompat, so I added an import for that and am now building successfully in the pipeline; although, some commenters in the linked post suggested this shouldn't be necessary. I was hoping someone here on the forum might help me understand why this occurred or direct me to some further reading.
Here is the now-resolved compiler error:
error: cannot convert value of type 'ByteBuffer' to expected argument type 'Data'
let decodedResponse = try decoder.decode(MyResponseType.self, from: body)
Thanks!