❔ sending multiple object json via API
Hello developers, i am Ayman
I am working on a project implementing api inside my web app mvc 5 but I'm struggling to send multiple object json via the api.
I need to know specifically how to send a json containing a model instance and a string.
Any help or advice would be appreciated
4 Replies
When i send only the model instance the api request works but not when i try sending the string aswell
Can you return a Dto containing the model and the string?
You can only send one thing. So what you do when you need to send multiple things is make a new thing that contains all the things you want. As artya said, create a dto like
and return an instance of that
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.