Can I pass an HTTP header in a ConnectorCallout for the Google Cloud Function extension?

Hi, there

I'm calling a Google Cloud Function extension, but need to pass an HTTP header to the function. Is there a way to do that? The function is getting called, but if I slip in an AssignMessage policy before the ConnectorCallout, it doesn't seem to affect the call to the extension.

Thanks,

Hans

0 5 326
5 REPLIES 5

There is no such functionality in the current version of Google Cloud Function extension.

I have logged a feature request to the engineering team. Will update this thread as soon as it's released.

P.S. No release ETAs

Didn't want to pile on too many things for my initial post, but in addition to headers, it'd be useful to pass on query string parameters and route (beyond the base path) as well to execute the function with the right parameters so to speak. Thanks.

@akhimich are there any updates regarding this subject? We handle querystring params by creating a payload from them for the gcf callout extension. There is also a desire to handle headers without a wholesale reworking of the cloud function which currently handles querystring and/or headers and/or body params. Thanks!

One workaround may be for you to expose the Cloud function via HTTP and call it directly via ServiceCallout.

Here's a starter.

You would need to authenticate; you'd need a token. That's not too difficult. You can build the right thing with a GenerateJWT and a Service Account JSON file. This SharedFlow shows you how you can do that.

Thanks again, Dino. We will try out these ideas.