Creating a Java callout with Http Streaming support

Not applicable

I am trying to create a Java callout, that calls a Http endpoint which returns a chunked event stream. I cannot use the out of the box Http TargetEndpoint, since I need to add support for Ntlm authentication on the destination.

I could not find any good samples to create a callout, with streaming support. Need some help/starter code.

Thanks

0 1 887
1 REPLY 1

I think you should first write a Java class that does what you need as far as invoking the target and receiving and processing the chunked stream. All of that is independent of the Apigee runtime. You can use any Java library you like - use the built-in HttpUrlConnection , or Apache HttpClient, or

And then, once you've got that done, just embed it into a skeleton that implements the Apigee callout interface. For an example of a skeleton, try this: https://github.com/DinoChiesa/ApigeeEdge-Java-SecureRandom