add bodyEntity
This commit is contained in:
@@ -3,6 +3,7 @@ package com.imyeyu.network;
|
||||
import com.imyeyu.io.IO;
|
||||
import org.apache.hc.client5.http.fluent.Request;
|
||||
import org.apache.hc.core5.http.Header;
|
||||
import org.apache.hc.core5.http.HttpEntity;
|
||||
import org.apache.hc.core5.http.HttpResponse;
|
||||
import org.apache.hc.core5.http.ProtocolException;
|
||||
|
||||
@@ -16,7 +17,7 @@ import java.nio.file.Path;
|
||||
* @author 夜雨
|
||||
* @since 2025-06-26 13:03
|
||||
*/
|
||||
public class FileRequest extends CommonRequest {
|
||||
public class FileRequest extends GsonRequest {
|
||||
|
||||
protected FileRequest(Request request) {
|
||||
super(request);
|
||||
@@ -58,6 +59,18 @@ public class FileRequest extends CommonRequest {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileRequest body(Object object) {
|
||||
super.body(object);
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FileRequest bodyEntity(HttpEntity entity) {
|
||||
super.bodyEntity(entity);
|
||||
return this;
|
||||
}
|
||||
|
||||
public void toFile(String path, String fileName) throws IOException, NoPermissionException {
|
||||
toFile(new File(IO.fitPath(path) + fileName));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user