Giter Site home page Giter Site logo

Comments (5)

jayden-qiu avatar jayden-qiu commented on June 13, 2024

I try set metadata in grpc-go, but It doesn't work

from protobuf-ts.

timostamm avatar timostamm commented on June 13, 2024

there isn't exist application/grpc, what should I do ?

You cannot use gRPC in a web browser. gRPC and gRPC-web are two different things.

from protobuf-ts.

jayden-qiu avatar jayden-qiu commented on June 13, 2024

there isn't exist application/grpc, what should I do ?

You cannot use gRPC in a web browser. gRPC and gRPC-web are two different things.

image
but in network tab, it can response data, it looks like grpc-web-format.js bug

from protobuf-ts.

jcready avatar jcready commented on June 13, 2024

A content-type of application/grpc isn't a valid grpc-web content-type. Please read the link in the comment right above the red box in your first screenshot: https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-WEB.md#protocol-differences-vs-grpc-over-http2

Content-Type

  1. application/grpc-web
  • e.g. application/grpc-web+[proto, json, thrift]
  • the sender should always specify the message format, e.g. +proto, +json
  • the receiver should assume the default is "+proto" when the message format is missing in Content-Type (as "application/grpc-web")
  1. application/grpc-web-text
  • text-encoded streams of “application/grpc-web”
  • e.g. application/grpc-web-text+[proto, thrift]

It doesn't seem like nginx actually provides support for grpc-web, only grpc. You'll need something like envoy to provide that support.

from protobuf-ts.

jayden-qiu avatar jayden-qiu commented on June 13, 2024

ok

from protobuf-ts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.