Search code examples
httpclientmicronaut

Micronaut http client exchange vs retrieve


What are the differences between exchange and retrieve methods for Micronaut HttpClient?


Solution

  • The return type. See HttpClient Javadoc

    exchange returns the full http response

    Whereas retrieve returns the body of the http response.