3 ms·
This is not my cup of tea. 1. I don't like magic string names like "AjaxExample1". Why not return an object, and use: var AjaxExpample1 = amplify.request...
by jcampbell1 16y ago
This is not my cup of tea.
1. I don't like magic string names like "AjaxExample1". Why not return an object, and use:
var AjaxExpample1 = amplify.request...
2. It is not clear how you mix get parameters and post data. If I want to POST to "/users/{id}/", how do I separate the post values from the parameter?
- walkon 16y agoFor concern #2, If they parameter names are found in the request, they are replaced in the url and removed from the POST form data. Full explaination here: http://amplifyjs.com/api/request/#url_substitution/routing http://amplifyjs.com/api/request/#url_substitution/routing
- bricestacey 16y agoThis is true, but the examples are incomplete. The "RESTful" POST example excludes parameters in the URL. Small mistake, but very confusing. I'd fix it, but they don't mention how to submit patches.
- balu 16y agoThey do mention it. It's a little bit hidden, but see http://amplifyjs.com/community/#pull_requests http://amplifyjs.com/community/#pull_requests