Hi Apigee Support,
I hope this message finds you well.
We are currently experiencing an issue with response streaming in our application. Below are the details:
From the code perspective, we are using yield to stream responses using stream with context (Flask Streaming) to yield responses. Despite enabling streaming on APIGEE, the response streaming is not functioning as expected.
Weird thing is it works on POSTMAN and doesn't works on browser with react app, calling that api or cURL.
This feature is critical for our application, and we need your assistance to resolve this issue on priority. Please investigate and revert back as soon as possible.
Thank you for your prompt attention to this matter.
Apigee config:
Proxy Endpoint:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ProxyEndpoint name="default">
<Description/>
<FaultRules/>
<PreFlow name="PreFlow">
<Request>
</Request>
<Response/>
</PreFlow>
<PostFlow name="PostFlow">
<Request/>
<Response/>
</PostFlow>
<Flows>
<Flow name="OptionsPreFlight">
<Request/>
<Response>
<Step>
<Name>AM-add-cors</Name>
</Step>
</Response>
<Condition>request.verb == "OPTIONS"</Condition>
</Flow>
</Flows>
<HTTPProxyConnection>
<BasePath>/path</BasePath>
<Properties>
<Property name="allow.http10">true</Property>
<Property name="response.streaming.enabled">true</Property>
<Property name="request.streaming.enabled">true</Property>
</Properties>
<VirtualHost>default</VirtualHost>
</HTTPProxyConnection>
<RouteRule name="NoRoute">
<Condition>(request.verb == "OPTIONS")</Condition>
</RouteRule>
<RouteRule name="default">
<TargetEndpoint>default</TargetEndpoint>
</RouteRule>
</ProxyEndpoint>
Target Endpoint:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<TargetEndpoint name="default">
<Description/>
<FaultRules/>
<PreFlow name="PreFlow">
<Request>
<Step>
<Name>CORS-test</Name>
</Step>
</Request>
<Response/>
</PreFlow>
<PostFlow name="PostFlow">
<Request/>
<Response/>
</PostFlow>
<Flows/>
<HTTPTargetConnection>
<Properties>
<Property name="io.timeout.millis">300000</Property>
<Property name="response.streaming.enabled">true</Property>
<Property name="request.streaming.enabled">true</Property>
<Property name="supports.http10">true</Property>
<Property name="request.retain.headers">User-Agent,Referer,Accept-Language</Property>
<Property name="retain.queryparams">apikey</Property>
</Properties>
<Authentication>
<GoogleIDToken>
<Audience>cloud_run url</Audience>
</GoogleIDToken>
</Authentication>
<SSLInfo>
<Enabled>true</Enabled>
<Enforce>true</Enforce>
</SSLInfo>
<URL>cloud run url</URL>
</HTTPTargetConnection>
</TargetEndpoint>