- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for MediaType (0.23 sec)
-
src/mime/mediatype.go
// attribute to the attribute value with its case preserved. func ParseMediaType(v string) (mediatype string, params map[string]string, err error) { base, _, _ := strings.Cut(v, ";") mediatype = strings.TrimSpace(strings.ToLower(base)) err = checkMediaTypeDisposition(mediatype) if err != nil { return "", nil, err } params = make(map[string]string)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 9.8K bytes - Viewed (0) -
src/main/java/org/codelibs/fess/util/SearchEngineUtil.java
private SearchEngineUtil() { } public static OutputStream getXContentBuilderOutputStream(final XContentBuilderCallback func, final MediaType mediaType) { try (final XContentBuilder builder = func.apply(mediaType.contentBuilder(), ToXContent.EMPTY_PARAMS)) { builder.flush(); return builder.getOutputStream(); } catch (final IOException e) {
Registered: Wed Jun 12 13:08:18 UTC 2024 - Last Modified: Thu Feb 22 01:37:57 UTC 2024 - 2.9K bytes - Viewed (0) -
fess-crawler/src/main/java/org/codelibs/fess/crawler/helper/impl/MimeTypeHelperImpl.java
try { if (useFilename) { final MediaType mediaType = mimeTypes.detect(null, metadata); if (!MediaType.OCTET_STREAM.equals(mediaType)) { return mediaType.getType() + "/" + mediaType.getSubtype(); } } final MediaType mediaType = mimeTypes.detect(is == null || is.markSupported() ? is : new BufferedInputStream(is), metadata);
Registered: Wed Jun 12 15:17:51 UTC 2024 - Last Modified: Thu Feb 22 01:36:27 UTC 2024 - 4.6K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/RequestBody.kt
@JvmName("create") fun String.toRequestBody(contentType: MediaType? = null): RequestBody { val (charset, finalContentType) = contentType.chooseCharset() val bytes = toByteArray(charset) return bytes.toRequestBody(finalContentType, 0, bytes.size) } @JvmStatic @JvmName("create") fun ByteString.toRequestBody(contentType: MediaType? = null): RequestBody = commonToRequestBody(contentType)
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Thu Jan 25 14:41:37 UTC 2024 - 9.6K bytes - Viewed (0) -
samples/guide/src/main/java/okhttp3/guide/PostExample.java
* limitations under the License. */ package okhttp3.guide; import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.RequestBody; import okhttp3.Response; public class PostExample { public static final MediaType JSON = MediaType.get("application/json; charset=utf-8"); final OkHttpClient client = new OkHttpClient();
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Fri Apr 05 03:30:42 UTC 2024 - 2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt
import okio.Buffer import okio.IOException import okio.Source import okio.Timeout import okio.buffer internal class UnreadableResponseBody( private val mediaType: MediaType?, private val contentLength: Long, ) : ResponseBody(), Source { override fun contentType() = mediaType override fun contentLength() = contentLength override fun source() = buffer() override fun read( sink: Buffer, byteCount: Long,
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 5.2K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/discovery/aggregated/wrapper.go
mediaType, _ := negotiation.NegotiateMediaTypeOptions(req.Header.Get("Accept"), wrapped.s.SupportedMediaTypes(), DiscoveryEndpointRestrictions) // mediaType.Convert looks at the request accept headers and is used to control whether the discovery document will be aggregated. if IsAggregatedDiscoveryGVK(mediaType.Convert) { wrapped.aggHandler.ServeHTTP(resp, req) return } }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 18:15:22 UTC 2024 - 2.9K bytes - Viewed (0) -
cmd/kubeadm/app/util/marshal.go
func MarshalToYamlForCodecs(obj runtime.Object, gv schema.GroupVersion, codecs serializer.CodecFactory) ([]byte, error) { const mediaType = runtime.ContentTypeYAML info, ok := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), mediaType) if !ok { return []byte{}, errors.Errorf("unsupported media type %q", mediaType) } encoder := codecs.EncoderForVersion(info.Serializer, gv) return runtime.Encode(encoder, obj) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Feb 29 05:14:21 UTC 2024 - 5.8K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/CallKotlinTest.kt
override fun contentType(): MediaType { return "application/xml".toMediaType() } override fun writeTo(sink: BufferedSink) { sink.writeUtf8("<el") sink.flush() throw IOException("failed to stream the XML") } } class ValidRequestBody : RequestBody() { override fun contentType(): MediaType { return "application/xml".toMediaType()
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Sat Jan 20 10:30:28 UTC 2024 - 8.4K bytes - Viewed (0)