Discussion (7)3
Log in or sign up to continue

Let's think about a scenario where we need to save a user in the database. I create a method that receives a JSON with the user's information.

At this moment, I receive "name", "email", and "password". Right after that, I create a UserDTO class to map the data.
 

Method createUser(@Request user As test.UserDTO) As %Status {
	// codes...
}

The object that is arriving would be the %request.Content, and when passing it to the createUser method, our @Request is the one that deserializes the JSON into an Iris type.