oracle / oracle/oci-java-sdk

Support HTTP headers on InvokeFunctionRequest/InvokeFunctionResponse

Open
#369 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

SDK
Dominant language
Java
Stars
243
Forks
171
Avg merge
30m
Merged PRs (30d)
4

Description

Cloud functions support sending and receiving HTTP headers when invoking functions. The Java SDK does not currently expose setting HTTP headers on InvokeFunctionRequest or getting them off InvokeFunctionResponse.

As a workaround for sending headers, the invocationCallback can be used to indirectly set headers. There is no such workaround for accessing response headers.

It looks easy enough to add in support. Getting headers off responses for example, the information is already on hand and would just need to be added onto: InvokeFunctionRequest.Builder & InvokeFunctionRequest

https://github.com/oracle/oci-java-sdk/blob/master/bmc-functions/src/main/java/com/oracle/bmc/functions/internal/http/InvokeFunctionConverter.java#L89

I'm looking into the feasibility of adding in support for these. Is this something that would be a welcomed contribution?

Thanks

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with bmc-functions/src/main/java/com/oracle/bmc/functions/internal/http/InvokeFunctionConverter.java around line 89, then inspect InvokeFunctionRequest.Builder, InvokeFunctionRequest, and InvokeFunctionResponse. Done means the Java SDK exposes HTTP headers for sending with requests and retrieving from responses, without relying on the invocationCallback workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, cloud
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.