This forum is in READ-ONLY mode.
You can look around, but if you want to ask a new question, please use Stack Overflow.

API with Symfony2

This forum is for non code-based questions, best practises, IDEs, version control tools, work opportunities, etc.

API with Symfony2

by ivan.toncev » Sun Mar 22, 2015 4:47 pm

Hi, I have a question about using symfony forms in API.
I've noticed that people are using forms to build APIs massively, but I am not sure if it is good practice.

My biggest concern is format of data that is sent.
Code: Select all
// regular rest POST request body
{
    "key1": "value1",
    "key2": "value2"
}

// post request body using forms
{
    "entityName": {
        "key1": "value1",
        "key2": "value2"
    }
}


So is a good practice to use forms in API?
ivan.toncev
Junior Member
 
Posts: 1
Joined: Sun Mar 22, 2015 4:31 pm