API Call and optional / not mandatory parameters

Best Practices

Hi flutterflow community, I have been playing around with flutterflow, and not sure i did find a way so far to manage API Call with optional parameter this way :

  • In the API Call i perform the variable / query parameter mapping

  • In a API Call perform from on action flow, I want to have a conditional rules base so that sometime I can populate a parameter, and have it as a value and query param in my backend call, and sometime i don't want either the value and the key

  • In fact I want to avoid call like "myParam1=value&myParam2=", where in my case myParam2 would be sometimes empty.

  • I think that is possible when using post and json payload with empty value

  • But for query param url, for now I have only managed that by duplicating my API Call and having a version with, and without some parameter, which I think lead to code duplication.

What about the community, do you have the same issue ? Did you find some other work around ? (except properly manage empty parameters on backend side ...)

8
12 replies