接口的使用
cn.taketoday.http.client.MultipartBodyBuilder.PartBuilder
-
cn.taketoday.http.client中MultipartBodyBuilder.PartBuilder的使用
修饰符和类型类说明private static classprivate static classMultipartBodyBuilder.PublisherPartBuilder<S,P extends org.reactivestreams.Publisher<S>> 修饰符和类型方法说明<T,P extends org.reactivestreams.Publisher<T>>
MultipartBodyBuilder.PartBuilderMultipartBodyBuilder.asyncPart(String name, P publisher, cn.taketoday.core.ParameterizedTypeReference<T> typeReference) Variant ofMultipartBodyBuilder.asyncPart(String, Publisher, Class)with aParameterizedTypeReferencefor the element type information.<T,P extends org.reactivestreams.Publisher<T>>
MultipartBodyBuilder.PartBuilderAdd a part fromPublishercontent.MultipartBodyBuilder.DefaultPartBuilder.contentType(MediaType contentType) MultipartBodyBuilder.PartBuilder.contentType(MediaType contentType) Set the media type of the part.Set the filename parameter for a file part.Add part header values.MultipartBodyBuilder.DefaultPartBuilder.headers(Consumer<HttpHeaders> headersConsumer) MultipartBodyBuilder.PartBuilder.headers(Consumer<HttpHeaders> headersConsumer) Manipulate the part headers through the given consumer.Add a part where the Object may be: String -- form fieldResource-- file part Object -- content to be encoded (e.g. to JSON)HttpEntity-- part content and headers although generally it's easier to add headers through the returned builderPart-- a part from a server requestVariant ofMultipartBodyBuilder.part(String, Object)that also accepts a MediaType.