Adhitya Resadikara
Adhitya Resadikara

Reputation: 109

How to send user input from TextField to GET method API without body? - Dart

I have a feedback form like this enter image description here the API for it using a GET method without body. I have to send user input from the 3 TextField (Nama, Email, Pesan Anda) to GET method API. enter image description here I'm clueless, my senior said that I have to use url parameters so I can still send data to API without a body. How can I do that?

Upvotes: 2

Views: 496

Answers (1)

Raphael Marques
Raphael Marques

Reputation: 769

HTTP GET method has no body on it's requisitions, so yes, the only way to send params is in the url, where you can send like this:

http://{URL}/?nama=Nama&email=Email&pesanAnda=PesanAnda

then you API will have access to these params.

Upvotes: 1

Related Questions