Play WS Native Transport

Is it possible to use native transport with Play WS? I’ve searched through GitHub - playframework/play-ws: Standalone Play WS, an async HTTP client with fluent API, but I can’t find anything about it. I know it should be an option on AsyncHttpClient, but I can’t figure out if it is supposed to be possible to use with Play WS.

Yes, because you can pass an already created instance of AsyncHttpClient to PlayWS. See the StandaloneAhcWSClient constructor.

Do you know how to deal with the shaded versions of AsyncHttpClient? If I try to construct an instance of AsyncHttpCient with setUseNativeTransport(true), I get errors trying to find the shaded native transport file. I’m not very familiar with shading though.

Example:

Caused by: java.lang.UnsatisfiedLinkError: could not load a native library: play_shaded_ahc_netty_transport_native_epoll_x86_64
       at play.shaded.ahc.io.netty.util.internal.NativeLibraryLoader.load(NativeLibraryLoader.java:233)
        at play.shaded.ahc.io.netty.channel.epoll.Native.loadNativeLibrary(Native.java:183)
        at play.shaded.ahc.io.netty.channel.epoll.Native.<clinit>(Native.java:61)
        at play.shaded.ahc.io.netty.channel.epoll.Epoll.<clinit>(Epoll.java:38)
        ... 38 more
        Suppressed: java.lang.UnsatisfiedLinkError: could not load a native library: play_shaded_ahc_netty_transport_native_epoll