0
 final body = {"Status": status};
final uri =
    Uri.http(EndpointsUrl.baseUrlURi, EndpointsUrl.appoinment,body);

I tried to pass the query parameter in the above code, but I got

{
"statusCode": 400,
"message": "Status Cannot be undefined.",
"error": "Bad Request"

}

Somebody please guide how to pass query params in HTTP get call-in flutter

2 Answers 2

1

Use this instead

    var uri = Uri.parse('http://www.myappserver.com');
    uri = uri.replace(query: 'yourParam=0');
    print(uri);
Sign up to request clarification or add additional context in comments.

1 Comment

can i see how exactly you wrote the query?
0

Query parameters should be added to the end of the url with “?” Symbol I’m not sure what are you trying to do here.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.