--- title: "Execute a Function" url: https://docs.catalyst.zoho.com/en/sdk/flutter/v2/serverless/functions/execute-function/ description: "You can execute a Catalyst function in several ways, based on the HTTP request you pass with the function." last_updated: 2025-11-19T15:07:41Z service: Serverless type: general related_links: - name: "Functions" url: /en/serverless/help/functions/introduction - name: "Implementing Functions" url: /en/serverless/help/functions/implementation - name: "Execute Function - API" url: /en/api/code-reference/serverless/functions/execute-function/#ExecuteFunction --- # Execute a Function You can execute a [Catalyst Basic I/O function](https://docs.catalyst.zoho.com/en/serverless/help/functions/introduction) in any one of the ways given below, based on the HTTP request you pass with the function. You can pass the parameters to the function to be executed as the argument to a function execution method. This method differs for each HTTP request type. The `<FUNCTION_INSTANCE>` used in all the code sections below is the instance defined in the [Function Instance page](https://docs.catalyst.zoho.com/en/sdk/flutter/v2/serverless/functions/create-function-instance). ### Execute a GET function You can execute a function of the HTTP GET type by passing the parameters to the `executeGET()` method as a Hash map: ```bash Future<String?> <FUNCTION_INSTANCE>.executeGET( Map<String, Dynamic> params) ``` **Parameters**: * `params`: The parameters to be passed to the function as a Hash map A sample code snippet is shown below: ```bash ZCatalystFunction function = ZCatalystApp.getInstance().getFunctionInstance(identifier: "LocalBackUp"); try{ var output = function.executeGET( params: { 'id': 2345642, //Pass the params to the function }); print('Function output: $output'); } on ZCatalystException catch (ex) { print(ex.toString()); } ``` ### Execute a PUT function You can execute a function of the HTTP PUT type by passing the parameters to the `executePUT()` method as a Hash map. You can pass the payload in the PUT request to this method as a Hash map argument as well: ```bash Future<String?> <FUNCTION_INSTANCE>.executePUT(Map<String, Dynamic> body, [Map<String, Dynamic>? params]) ``` **Parameters**: * `params`: The parameters to be passed to the function as a Hash map * `body`: The data payload to be passed as a Hash map A sample code snippet is shown below: ```bash ZCatalystFunction function = ZCatalystApp.getInstance().getFunctionInstance(identifier: 'LocalBackUp'); var body = <String, Dynamic>{ "ROWID": "2823000000098012", "Category": "Important" }; //Define the function instance and pass the payload to the map try{ var output = await function.executePUT( body: body, params: { 'id': 2345642, //Pass the params to the function }); print('Function output: $output'); } on ZCatalystException catch (ex) { print(ex.toString()); } ``` ### Execute a POST function You can execute a function of the HTTP POST type by passing the parameters to the `executePOST()` method as a Hash map. You can pass the payload in the POST request to this method as a Hash map argument as well: ```bash Future<String?> executePOST(Map<String, dynamic> body) ``` **Parameters**: * `params`: The parameters to be passed to the function as a Hash map * `body`: The data payload to be passed as a Hash map A sample code snippet is shown below: ```bash ZCatalystFunction function = ZCatalystApp.getInstance().getFunctionInstance(identifier: 'LocalBackUp'); var body = <String, Dynamic>{ "ROWID": "2823000000098012", "Category": "Important" //Define the function instance and pass the payload to the Hash map }; try{ var output = await function.executePOST(body: body); print('Function output: $output'); } on ZCatalystException catch (ex) { print(ex.toString()); } ``` ### Execute a DELETE function You can execute a function of the HTTP DELETE type by passing the parameters to the `executeDELETE()` method as a Hash map. You can pass the payload in the DELETE request to this method as a Hash map argument as well: ```bash Future<APIResponse> <FUNCTION_INSTANCE>.executeDELETE(Map<String, Dynamic> body, [Map<String, Dynamic>? params]) ``` **Parameters**: * `params`: The parameters to be passed to the function as a Hash map * `body`: The data payload to be passed as a Hash map A sample code snippet is shown below: ```bash try { ZCatalystFunction function = app.getFunctionInstance(identifier: 'DeleteData'); var response = await function.executeDELETE({"id": 298922}); } on ZCatalystException catch (ex) { print(ex.toString()); } ```