public class ResourceBody extends Object implements RequestBody
Resource
类型的Http request body,主要发送编码后的表单数据或rest body(如JSON或XML)Constructor and Description |
---|
ResourceBody(Resource resource)
构造
|
Modifier and Type | Method and Description |
---|---|
static ResourceBody |
create(Resource resource)
创建 Http request body
|
String |
toString() |
void |
write(OutputStream out)
写出数据,不关闭流
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
writeClose
public ResourceBody(Resource resource)
resource
- Body内容,编码后public static ResourceBody create(Resource resource)
resource
- body内容,编码后public void write(OutputStream out)
RequestBody
write
in interface RequestBody
out
- out流Copyright © 2024. All rights reserved.