Back

[solved] - finding function values?

  • 0
  • Flutter
  • Functions
dammy
7 Jun, 2023, 09:39

I checked the readme.md file, but did not find a complete suggestion for these values

TL;DR
Summary: The user was trying to find function values in a support thread. They faced errors when trying to get a response and received suggestions to decode the response and check function values. The user later confirmed that the issue was solved after checking the readme.md file. Solution: The user should decode the response if it is a string and check if the function values are set correctly in the settings. The user can also refer to the readme.md file for more suggestions on these values.
dammy
7 Jun, 2023, 10:24

[solved] - finding function values?

joeyouss
7 Jun, 2023, 11:33

hi, is this solved for you?

dammy
7 Jun, 2023, 11:47

can't say yet, seems like

joeyouss
7 Jun, 2023, 11:49

Whatโ€™s the problem you are facing?

dammy
7 Jun, 2023, 11:50

by then I will know if the function values I put for appwrite are corrct

joeyouss
7 Jun, 2023, 12:07

Ok

dammy
7 Jun, 2023, 12:30

any answer to this?

dammy
7 Jun, 2023, 12:31

want to receive value from client, already sent from client though

Binyamin
7 Jun, 2023, 13:06

Have you set those values in your function variable section in the settings?

Binyamin
7 Jun, 2023, 13:18

If you're referring to the function was send to you from the client side? Then, it's a string inside the req.payload variable.

TypeScript
final stringData = req.payload;

It's always a string so in case that you've send and object then you'll need to decode it.

TypeScript
import 'dart:convert';

/*
 * The rest of the function code
 */

var data = '';
try {
  data = jsonDecode(req.payload);
} catch (e) {
  // Handle case when no data available to parse.
}

See more details here: https://appwrite.io/docs/functions

dammy
7 Jun, 2023, 13:35

Oook

dammy
7 Jun, 2023, 21:31

done, thanks, one more

trying to get response but got error

TypeScript
      // print(response["status"]);
      final serverResponse = jsonDecode(response.toString());
      print(serverResponse["status"]);
    }````


```[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: NoSuchMethodError: Class 'Execution' has no instance method '[]'.
Receiver: Instance of 'Execution'```
Drake
7 Jun, 2023, 22:37

Create execution returns an Execution object. Use the autocomplete feature on your IDE to see how to use the object. Don't call to string on it

dammy
8 Jun, 2023, 00:09

okay, I appreciate you @Steven

dammy
8 Jun, 2023, 05:34

did nit find any that worked

Drake
8 Jun, 2023, 14:26

please create a new <#1072905050399191082> post and don't reuse posts for a different problem

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more