Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Conditional streaming in Apigee

T25
Bronze 1
Bronze 1

Hello,
I am facing some problems when dealing with streaming in my Apigee (Edge) proxy.

I need streaming to be enabled for 2 of my endpoints (let's say POST file and GET file).
For another endpoint which is not related to files, I need to access and process payload (just a lightweight JSON) in Target Endpoint.

I did the following:
- 1 proxy endpoint, with streaming enabled both on request and response
- 1 target endpoint for file operations, with streaming enabled
- 1 target endpoint without streaming for others endpoints

My problem is that when I try to access the payload in the target endpoint without streaming, it is empty. And if I disable streaming at proxy endpoint level, it do not handle heavy file anymore.

How could I implement such conditional streaming ?

 

Thanks in advance 🙂

1 1 104
1 REPLY 1

Separate proxies?

/basepath -> for proxy bundle #1, with streaming enabled 

/basepath/upload -> for proxy bundle #2, with no streaming

Or, you could chain proxies . 

proxy1 = with streaming enabled.

target1 => points directly to the target

target2 => points to another proxy (proxy 2), which is a passthrough, and THAT proxy points to the target.  In proxy2 you can  have no streaming, and can manipulate the payload. 

Top Solution Authors