- Sort Score
- Result 10 results
- Languages All
Results 31 - 40 of 61 for MediaType (0.15 sec)
-
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) -
src/mime/multipart/example_test.go
Body: strings.NewReader( "--foo\r\nFoo: one\r\n\r\nA section\r\n" + "--foo\r\nFoo: two\r\n\r\nAnd another\r\n" + "--foo--\r\n"), } mediaType, params, err := mime.ParseMediaType(msg.Header.Get("Content-Type")) if err != nil { log.Fatal(err) } if strings.HasPrefix(mediaType, "multipart/") { mr := multipart.NewReader(msg.Body, params["boundary"]) for { p, err := mr.NextPart() if err == io.EOF { return
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 20 18:41:18 UTC 2020 - 1.1K bytes - Viewed (0) -
okhttp-testing-support/src/main/kotlin/okhttp3/internal/duplex/AsyncRequestBody.kt
*/ package okhttp3.internal.duplex import java.util.concurrent.BlockingQueue import java.util.concurrent.LinkedBlockingQueue import java.util.concurrent.TimeUnit.SECONDS import okhttp3.MediaType import okhttp3.RequestBody import okio.BufferedSink import org.junit.jupiter.api.Assertions.assertTrue /** A duplex request body that keeps the provided sinks so they can be written to later. */
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Wed Dec 20 23:27:07 UTC 2023 - 1.5K 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/kube-scheduler/app/options/configfile.go
func encodeConfig(cfg *config.KubeSchedulerConfiguration) (*bytes.Buffer, error) { buf := new(bytes.Buffer) const mediaType = runtime.ContentTypeYAML info, ok := runtime.SerializerInfoForMediaType(scheme.Codecs.SupportedMediaTypes(), mediaType) if !ok { return buf, fmt.Errorf("unable to locate encoder -- %q is not a supported media type", mediaType) } var encoder runtime.Encoder switch cfg.TypeMeta.APIVersion {
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Thu Aug 17 05:27:21 UTC 2023 - 3.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/FormBody.kt
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3 import java.io.IOException import java.nio.charset.Charset import okhttp3.MediaType.Companion.toMediaType import okhttp3.internal.toImmutableList import okhttp3.internal.url.FORM_ENCODE_SET import okhttp3.internal.url.canonicalizeWithCharset import okhttp3.internal.url.percentDecode import okio.Buffer
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Tue Jan 09 12:33:05 UTC 2024 - 4.3K bytes - Viewed (0) -
pkg/kubelet/kubeletconfig/util/codec/codec.go
_, codecs, err := scheme.NewSchemeAndCodecs() if err != nil { return nil, err } mediaType := "application/yaml" info, ok := runtime.SerializerInfoForMediaType(codecs.SupportedMediaTypes(), mediaType) if !ok { return nil, fmt.Errorf("unsupported media type %q", mediaType) } return codecs.EncoderForVersion(info.Serializer, targetVersion), nil }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Nov 03 21:48:29 UTC 2023 - 4.2K bytes - Viewed (0) -
samples/bookinfo/src/reviews/reviews-application/src/main/java/application/rest/LibertyRestEndpoint.java
import javax.ws.rs.client.Invocation; import javax.ws.rs.client.WebTarget; import javax.ws.rs.core.Application; import javax.ws.rs.core.Context; import javax.ws.rs.core.HttpHeaders; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import java.io.StringReader; @Path("/") public class LibertyRestEndpoint extends Application {
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Mar 15 22:25:32 UTC 2023 - 8.5K 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) -
samples/guide/src/main/java/okhttp3/recipes/Progress.java
* See the License for the specific language governing permissions and * limitations under the License. */ package okhttp3.recipes; import java.io.IOException; import okhttp3.MediaType; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.ResponseBody; import okio.Buffer; import okio.BufferedSource; import okio.ForwardingSource; import okio.Okio;
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Sat Jan 12 03:31:36 UTC 2019 - 3.9K bytes - Viewed (0)