public interface WSClient
extends java.io.Closeable
Most of the time you will access this through dependency injection, i.e.
import javax.inject.Inject;
import play.libs.ws.*;
import java.util.concurrent.CompletionStage;
public class MyService {
@Inject WSClient ws;
// ...
}
Please see https://www.playframework.com/documentation/latest/JavaWS for more details.Modifier and Type | Method and Description |
---|---|
play.api.libs.ws.WSClient |
asScala() |
void |
close()
Closes this client, and releases underlying resources.
|
java.lang.Object |
getUnderlying()
The underlying implementation of the client, if any.
|
WSRequest |
url(java.lang.String url)
Returns a WSRequest object representing the URL.
|
java.lang.Object getUnderlying()
play.api.libs.ws.WSClient asScala()
WSRequest url(java.lang.String url)
Promise<WSResponse>
.url
- the URL to requestvoid close() throws java.io.IOException
Use this for manually instantiated clients.
close
in interface java.lang.AutoCloseable
close
in interface java.io.Closeable
java.io.IOException