fn -v deploy --app <app-name>
oci fn function invoke --function-id <function-ocid> --file "-" --body '{"ENDPOINT":"<predict-url>", "PAYLOAD": "<json-payload>"}'
oci fn function invoke --function-id <function-ocid> --file "-" --body '{"ENDPOINT":"https://modeldeployment.us-ashburn-1.oci.customer-oci.com/<md-ocid>/predict", "PAYLOAD": "{\"index\": \"1\"}"}'
fn invoke <app-name> <function-name>
echo -n '{"ENDPOINT":"https://modeldeployment.us-ashburn-1.oci.customer-oci.com/<md-ocid>/predict", "PAYLOAD": "{\"index\": \"1\"}"}' | fn invoke <app-name> <function-name>
The sample code in func.py also shows how to get headers and request body. Required headers can also be passed to downstream call, if needed. Other ways of function invocation can be found here