{"id":23338419,"url":"https://github.com/abhirockzz/fn-java-client-example","last_synced_at":"2025-04-07T13:43:51.933Z","repository":{"id":79124985,"uuid":"144564484","full_name":"abhirockzz/fn-java-client-example","owner":"abhirockzz","description":"Example for a Java client invoking a Function HTTP endpoint","archived":false,"fork":false,"pushed_at":"2019-01-17T11:03:20.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-13T16:33:32.445Z","etag":null,"topics":["fnproject","functions","serverless"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/abhirockzz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-13T10:28:02.000Z","updated_at":"2019-01-17T11:03:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"10bf83d9-d2ce-44d4-ab83-dac135349bf8","html_url":"https://github.com/abhirockzz/fn-java-client-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhirockzz%2Ffn-java-client-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhirockzz%2Ffn-java-client-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhirockzz%2Ffn-java-client-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abhirockzz%2Ffn-java-client-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abhirockzz","download_url":"https://codeload.github.com/abhirockzz/fn-java-client-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247666003,"owners_count":20975785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fnproject","functions","serverless"],"created_at":"2024-12-21T03:13:53.056Z","updated_at":"2025-04-07T13:43:51.909Z","avatar_url":"https://github.com/abhirockzz.png","language":"Java","readme":"# Example for a Java client invoking a Function HTTP endpoint\r\n\r\nFunction endpoints are protected and need to be invoked using valid authentication context. You would need to use OCI Request Signature [as outlined in this document](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/signingrequests.htm?TocPath=Developer%20Tools%20|REST%20APIs%20|_____4). This example shows how to invoke Functions HTTP endpoints using OCI Request Signature based Java Client\r\n\r\n## Make sure you have the following information....\r\n\r\n- your tenancy OCID, user OCID, fingerprint, private Key - [details here](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/apisigningkey.htm)\r\n- to find the HTTP endpoint for your function - execute `fn inspect fn \u003capp_name\u003e \u003cfunction_name\u003e` and the look out for value of `fnproject.io/fn/invokeEndpoint` attribute\r\n\r\n## Details\r\n\r\n- The HTTP interaction is in `FnClientCommon.java`\r\n\t- it is based [on this](https://docs.cloud.oracle.com/iaas/Content/API/Concepts/signingrequests.htm?TocPath=Developer%20Tools%20|REST%20APIs%20|_____4#Java)\r\n\t- it uses the [Apache HTTP Client](https://hc.apache.org/) (but you should be able to build an implementation using a client library of your choice)\r\n\r\n- `FnHTTPGet.java` and `FnHTTPPost.java` are examples of invoking HTTP `GET` and `POST` respectively using `FnClientCommon.java`\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhirockzz%2Ffn-java-client-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabhirockzz%2Ffn-java-client-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabhirockzz%2Ffn-java-client-example/lists"}