Class GrpcMediaType


  • @Unstable
    public final class GrpcMediaType
    extends Object
    The gRPC media types.
    • Field Detail

      • GRPC_PROTO

        public static final CharSequence GRPC_PROTO
        gRPC with Protobuf message format.
      • GRPC_WEB

        public static final CharSequence GRPC_WEB
        gRPC Web binary.
      • GRPC_WEB_PROTO

        public static final CharSequence GRPC_WEB_PROTO
        gRPC Web binary with Protobuf message format.
      • GRPC_WEB_TEXT

        public static final CharSequence GRPC_WEB_TEXT
        gRPC Web text (base64).
      • GRPC_WEB_TEXT_PROTO

        public static final CharSequence GRPC_WEB_TEXT_PROTO
        gRPC Web text (base64) with Protobuf message format.
    • Method Detail

      • isGrpcWeb

        public static boolean isGrpcWeb​(CharSequence mediaType)
        Whether the provided mediaType represents gRPC-Web
        Parameters:
        mediaType - the value to test
        Returns:
        true if the value represents gRPC-Web, false otherwise
      • isGrpcWebText

        public static boolean isGrpcWebText​(CharSequence mediaType)
        Whether the provided mediaType represents gRPC-Web
        Parameters:
        mediaType - the value to test
        Returns:
        true if the value represents gRPC-Web, false otherwise