Git Product home page Git Product logo

Comments (8)

kayx23 avatar kayx23 commented on June 25, 2024

grpc-transcode is for transcoding between regular HTTP requests and gRPC, so it is expected that the upstream response is returned in JSON.

It sounds like you are not looking for any transcoding but to have APISIX proxy for your request to gRPC upstream service, is that correct?

from apisix.

snowleopard331 avatar snowleopard331 commented on June 25, 2024

grpc-transcode is for transcoding between regular HTTP requests and gRPC, so it is expected that the upstream response is returned in JSON.

It sounds like you are not looking for any transcoding but to have APISIX proxy for your request to gRPC upstream service, is that correct?

At present, I am using APISIX to proxy my upstreams, and the client uses JSON as the HTTP body. Currently, grpc-transcode is enabled, so the client's input and output are both in JSON format. Now the client wants to use protobuf as the input and output, but I don't know how to configure it. I have tried some solutions, but none have been successful; using HTTP+PB requests, the upstream can receive and process them, but APISIX always returns JSON to the client. What I want is a route configuration that can return protobuf. Thanks

from apisix.

kayx23 avatar kayx23 commented on June 25, 2024

APISIX always returns JSON to the client. What I want is a route configuration that can return protobuf.

I'm not aware if APISIX can do this. @shreemaan-abhishek thoughts?

from apisix.

shreemaan-abhishek avatar shreemaan-abhishek commented on June 25, 2024

no there is no such feature. do you mean to say that upstream returns PB but APISIX modifies it to JSON?

from apisix.

snowleopard331 avatar snowleopard331 commented on June 25, 2024

no there is no such feature. do you mean to say that upstream returns PB but APISIX modifies it to JSON?

No. All PB. No JSON. Do you know how to config APISIX route? Send PB and receive PB. Thank you.

from apisix.

shreemaan-abhishek avatar shreemaan-abhishek commented on June 25, 2024

No. All PB. No JSON.

I meant to ask, does the upstream return JSON even when not using APISIX?

from apisix.

snowleopard331 avatar snowleopard331 commented on June 25, 2024

No. All PB. No JSON.

I meant to ask, does the upstream return JSON even when not using APISIX?

upstream return pb, protocol is grpc

from apisix.

shreemaan-abhishek avatar shreemaan-abhishek commented on June 25, 2024

@snowleopard331, can you prepare a github gist/repo with a self contained example to reproduce this issue? I will take a look at this when I am free.

from apisix.

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.