Encoded Body Params

Hey Everyone!

I just wanna ask you that how to encode data receiving from an http request to use it in our Rest API’s ? Basically its the data receiving from Flutter APP i want to use this data in my elixir functions.

what type of data do you receive in the request? Is it a GET request, then in your controller it is normally a Map. If its a POST request then the body can contain everything, but usually jason, that is already encoded.
Or do you mean “how to decode data receiving” ?

1 Like

yes you are right i am just asking that is it mandatory to decode data that we received from any client in elixir???

If yes then how we can decode it?

If it is a JSON then you can use e.g. the Jason module with its decode/2

You can see examples in the the Basic Usage

1 Like

okay thanks everyone.