- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 458 for contentType (0.14 sec)
-
platforms/software/resources/src/main/java/org/gradle/internal/resource/UriTextResource.java
paramValue.setLength(0); int separator = contentType.indexOf("=", pos); if (separator < 0) { separator = contentType.length(); } paramName.append(contentType.substring(pos, separator).trim()); if (separator >= contentType.length() - 1) { return contentType.length(); } int startValue = separator + 1; int endValue;
Registered: 2024-06-12 18:38 - Last Modified: 2023-10-12 19:38 - 11.8K bytes - Viewed (0) -
staging/src/k8s.io/apimachinery/pkg/runtime/negotiate.go
} info = mediaTypes[0] } return n.serializer.EncoderForVersion(info.Serializer, n.encode), nil } func (n *clientNegotiator) Decoder(contentType string, params map[string]string) (Decoder, error) { mediaTypes := n.serializer.SupportedMediaTypes() info, ok := SerializerInfoForMediaType(mediaTypes, contentType) if !ok { if len(contentType) != 0 || len(mediaTypes) == 0 {
Registered: 2024-06-15 01:39 - Last Modified: 2020-10-29 19:55 - 3.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/endpoints/handlers/negotiation/negotiate_test.go
serializer runtime.Serializer contentType string params map[string]string errFn func(error) bool }{ // pick a default { req: &http.Request{}, contentType: "application/json", ns: &fakeNegotiater{serializer: fakeCodec, types: []string{"application/json"}}, serializer: fakeCodec, }, { accept: "", contentType: "application/json",
Registered: 2024-06-15 01:39 - Last Modified: 2019-10-10 10:53 - 9K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/server/filters/content_type.go
import "net/http" // WithContentType sets both the Content-Type and the X-Content-Type-Options (nosniff) header func WithContentType(handler http.Handler, contentType string) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { w.Header().Set("Content-Type", contentType) w.Header().Set("X-Content-Type-Options", "nosniff") handler.ServeHTTP(w, r) })
Registered: 2024-06-15 01:39 - Last Modified: 2019-01-04 23:35 - 983 bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/RequestTest.kt
val contentType = "text/plain; charset=utf-16be".toMediaType() val body = "\u0800".toRequestBody(contentType) assertThat(body.contentType()).isEqualTo(contentType) assertThat(body.contentLength()).isEqualTo(2) assertThat(bodyToHex(body)).isEqualTo("0800") } @Test fun byteArray() { val contentType = "text/plain".toMediaType() val body: RequestBody = "abc".toByteArray().toRequestBody(contentType)
Registered: 2024-06-16 04:42 - Last Modified: 2024-01-08 01:13 - 16.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseBodyCommon.kt
internal fun ByteArray.commonToResponseBody(contentType: MediaType?): ResponseBody { return Buffer() .write(this) .asResponseBody(contentType, size.toLong()) } internal fun ByteString.commonToResponseBody(contentType: MediaType?): ResponseBody { return Buffer() .write(this) .asResponseBody(contentType, size.toLong()) } internal fun BufferedSource.commonAsResponseBody(
Registered: 2024-06-16 04:42 - Last Modified: 2024-01-08 01:13 - 2.3K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/registry/generic/rest/streamer.go
if err = s.ResponseChecker.Check(resp); err != nil { return nil, false, "", err } } contentType = s.ContentType if len(contentType) == 0 { contentType = resp.Header.Get("Content-Type") if len(contentType) > 0 { contentType = strings.TrimSpace(strings.SplitN(contentType, ";", 2)[0]) } } flush = s.Flush stream = resp.Body return }
Registered: 2024-06-15 01:39 - Last Modified: 2023-03-10 16:43 - 3.8K bytes - Viewed (0) -
platforms/software/resources/src/main/java/org/gradle/internal/resource/DownloadedUriTextResource.java
private final String contentType; private final File downloadedResource; public DownloadedUriTextResource(String description, URI sourceUri, String contentType, File downloadedResource, RelativeFilePathResolver resolver) { super(description, sourceUri, resolver); this.contentType = contentType; this.downloadedResource = downloadedResource; }
Registered: 2024-06-12 18:38 - Last Modified: 2023-10-12 19:38 - 1.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/RequestBody.kt
fun ByteString.toRequestBody(contentType: MediaType? = null): RequestBody = commonToRequestBody(contentType) /** Returns a new request body that transmits this. */ @JvmStatic @JvmName("create") @ExperimentalOkHttpApi fun FileDescriptor.toRequestBody(contentType: MediaType? = null): RequestBody { return object : RequestBody() { override fun contentType() = contentType
Registered: 2024-06-16 04:42 - Last Modified: 2024-01-25 14:41 - 9.6K bytes - Viewed (0) -
platforms/software/resources/src/main/java/org/gradle/internal/resource/metadata/DefaultExternalResourceMetaData.java
this(location, lastModified > 0 ? new Date(lastModified) : null, contentLength, contentType, etag, sha1, null, false); }
Registered: 2024-06-12 18:38 - Last Modified: 2023-10-12 19:38 - 2.9K bytes - Viewed (0)