Back

[SOLVED] Does GET method in cloud function read the body request?

  • 0
  • Functions
Drake
16 Dec, 2023, 04:13

No. You should put the data in the url as query string params

TL;DR
The user was confused about the usage of the GET method in a cloud function. They realized that they needed to use POST instead and were unsure about how to pass query string parameters. However, another user clarified that query string parameters should be put in the URL, not in the body request. The issue has been solved.
Mosh Ontong
16 Dec, 2023, 04:20

alright thank you steven

Mosh Ontong
16 Dec, 2023, 04:21

[SOLVED] Does GET method in cloud function read the body request?

Mosh Ontong
16 Dec, 2023, 04:28

I dont receive any query string params

Mosh Ontong
16 Dec, 2023, 04:28
Mosh Ontong
16 Dec, 2023, 04:28
Mosh Ontong
16 Dec, 2023, 04:29
Mosh Ontong
16 Dec, 2023, 04:29

Query String: __________

No value here

Drake
16 Dec, 2023, 04:32

How about if you execute via the console?

Mosh Ontong
16 Dec, 2023, 04:38
Mosh Ontong
16 Dec, 2023, 04:38

is this correct?

Drake
16 Dec, 2023, 04:39

No double quotes

Mosh Ontong
16 Dec, 2023, 04:39
Mosh Ontong
16 Dec, 2023, 04:39

how about this?

Mosh Ontong
16 Dec, 2023, 04:39
Mosh Ontong
16 Dec, 2023, 04:40
Mosh Ontong
16 Dec, 2023, 04:40

No queries

Mosh Ontong
16 Dec, 2023, 04:49
Mosh Ontong
16 Dec, 2023, 04:49

I just convert the method into POst from Get

Mosh Ontong
16 Dec, 2023, 04:50

Searching facilities with query: {"type":"%22medlab%22","limitDefault":30}

Mosh Ontong
16 Dec, 2023, 04:50

I got now the type

Mosh Ontong
16 Dec, 2023, 04:53

hmm its fixed I just undo it into Get method

Mosh Ontong
16 Dec, 2023, 04:53
Mosh Ontong
16 Dec, 2023, 04:53

I got the type query now

Mosh Ontong
16 Dec, 2023, 04:54

so weird

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