public class Response extends Object
| 构造器和说明 |
|---|
Response() |
Response(CDPSession client,
Request request,
ResponsePayload responsePayload) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected void |
bodyLoadedPromiseFulfill(String errorMsg) |
byte[] |
buffer()
获取该响应的byte数组
|
Frame |
frame() |
boolean |
fromCache() |
boolean |
fromServiceWorker() |
Map<String,String> |
headers() |
<T> T |
json(Class<T> clazz) |
boolean |
ok() |
RemoteAddress |
remoteAddress() |
Request |
request() |
protected void |
resolveBody(String errorMsg)
处理请求体响应
|
SecurityDetails |
securityDetails() |
int |
status() |
String |
statusText() |
String |
text() |
String |
url() |
public Response()
public Response(CDPSession client, Request request, ResponsePayload responsePayload)
protected void resolveBody(String errorMsg)
errorMsg - 错误信息protected void bodyLoadedPromiseFulfill(String errorMsg)
public boolean ok()
public byte[] buffer()
throws InterruptedException
InterruptedException - 被打断异常public String text() throws InterruptedException
public <T> T json(Class<T> clazz) throws IOException, InterruptedException
public Request request()
public boolean fromCache()
public String url()
public int status()
public String statusText()
public SecurityDetails securityDetails()
public boolean fromServiceWorker()
public Frame frame()
public RemoteAddress remoteAddress()
Copyright © 2020. All rights reserved.