Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Example for a Java client invoking a Function HTTP endpoint

Function 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. This example shows how to invoke Functions HTTP endpoints using OCI Request Signature based Java Client

Make sure you have the following information....

  • your tenancy OCID, user OCID, fingerprint, private Key - details here
  • to find the HTTP endpoint for your function - execute fn inspect fn <app_name> <function_name> and the look out for value of fnproject.io/fn/invokeEndpoint attribute

Details

  • The HTTP interaction is in FnClientCommon.java

    • it is based on this
    • it uses the Apache HTTP Client (but you should be able to build an implementation using a client library of your choice)
  • FnHTTPGet.java and FnHTTPPost.java are examples of invoking HTTP GET and POST respectively using FnClientCommon.java

About

Example for a Java client invoking a Function HTTP endpoint

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages