This commit is contained in:
@@ -8,6 +8,7 @@ package org.redkale.net.http;
|
||||
import java.io.Serializable;
|
||||
import java.net.HttpCookie;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import org.redkale.convert.*;
|
||||
import org.redkale.convert.json.JsonConvert;
|
||||
|
||||
@@ -105,6 +106,14 @@ public class HttpResult<T> {
|
||||
return headers == null ? null : headers.getOrDefault(name, dfvalue);
|
||||
}
|
||||
|
||||
public CompletableFuture<HttpResult<T>> toFuture() {
|
||||
return CompletableFuture.completedFuture(this);
|
||||
}
|
||||
|
||||
public CompletableFuture toAnyFuture() {
|
||||
return CompletableFuture.completedFuture(this);
|
||||
}
|
||||
|
||||
public Map<String, String> getHeaders() {
|
||||
return headers;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user