play.libs.ws
类 WSAsync

java.lang.Object
  继承者 play.libs.ws.WSAsync
所有已实现的接口:
WS.WSImpl

public class WSAsync
extends java.lang.Object
implements WS.WSImpl

Simple HTTP client to make webservices requests.

Get latest BBC World news as a RSS content

    HttpResponse response = WS.url("http://newsrss.bbc.co.uk/rss/newsonline_world_edition/front_page/rss.xml").get();
    Document xmldoc = response.getXml();
    // the real pain begins here...
 

Search what Yahoo! thinks of google (starting from the 30th result).

    HttpResponse response = WS.url("http://search.yahoo.com/search?p=%s&pstart=1&b=%s", "Google killed me", "30").get();
    if( response.getStatus() == 200 ) {
       html = response.getString();
    }
 


嵌套类摘要
static class WSAsync.HttpAsyncResponse
          An HTTP response wrapper
 class WSAsync.WSAsyncRequest
           
 
构造方法摘要
WSAsync()
           
 
方法摘要
 WS.WSRequest newRequest(java.lang.String url, java.lang.String encoding)
           
 void stop()
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

WSAsync

public WSAsync()
方法详细信息

stop

public void stop()
指定者:
接口 WS.WSImpl 中的 stop

newRequest

public WS.WSRequest newRequest(java.lang.String url,
                               java.lang.String encoding)
指定者:
接口 WS.WSImpl 中的 newRequest


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly