99 search results

…what I get: Shauns-MBP:Development shaunthornburgh$ cd knpu-symfony-rest-example/ Shauns-MBP:knpu-symfony-rest-example shaunthornburgh$ composer info "guzzlehttp/guzzle" name : guzzlehttp/guzzle descrip. : Guzzle is a PHP HTTP client library and framework for building RESTful web service clients keywords : client, curl…
…of thing to do. Technically, it's not RESTful... because it means that if I authenticate as user A and go to /posts I will get a different "resource" than if I authenticate as user B and also go to /posts... but I think that…
weaverryan
weaverryan
Read Full Comment
Alright, thank you. Ye, I think I would prefer this simple but not so RESTful approach over the more complicated but RESTful approach. Rules are made to be broken, right? ;) Thank you for response, it is very much appreciated.
Eagerly awaiting this too, in the meantime, check this out https://codereviewvideos.com/course/how-to-code-a-symfony-2-restful-api-with-fos-rest-bundle
twomartoe
twomartoe
Read Full Comment
…a 4xx and an appropriate JSON response. Yup, I am primarily talking from a standpoint of someone who is building a RESTful API so a 404 page wouldn't work for me, but even if I wasn't, that's how I would approach this…
…s the ultimate custom option. But, it's not a bad idea... you just start to be less RESTful with this "odd" endpoints. But ultimately, API Platform mostly just generates routes and then uses the Symfony serializer to serialize data. You could definitely create a…
weaverryan
weaverryan
Read Full Comment
…human intervention) without either: a human clicking a form "submit" buttion or without the ability to execute javascript. So only people that aren't being restful (i.e. performing delete and patch/put functions on a GET request) benefit from this. #2: Why use CSRF…
…Feel like the GET collection endpoint is the right place for this. Annotation is not the problem and it does work. ` * @ApiFilter(SearchFilter::class, properties={ * "id": "exact", * ... * }) ` But is this ReSTful? Is there a better approach? The only downside I can see is hitting the…
…this with either the Messenger integration or a custom controller. It is not, as far as I know, a very "RESTful" thing to do, which is fine, but that's probably why it doesn't feel like it fits with a normal, RESTful solution. Cheers!
weaverryan
weaverryan
Read Full Comment
…dr for custom operations would be that (A) I try to avoid them when possible by making RESTful endpoints where I can trigger custom code - https://symfonycasts.com/screencast/api-platform-extending/publish-state-change - which would still allow you to trigger custom code (but…
weaverryan
weaverryan
Read Full Comment
…best practice" with Api Platform. API Platform talks a lot about REST best practices. And so often, there are perfectly fine solutions that are not RESTful, and so it seems (when reading the docs or issues) that this is "not a good solution". It is…
weaverryan
weaverryan
Read Full Comment
…I would do a manual, quick count query yourself in that operation and return it. It's not very RESTful... but who cares ;). I can think of a few other, more RESTful ways to do this... but ultimately, they all still query for objects in…
weaverryan
weaverryan
Read Full Comment
…after that :). So, the first thing to figure out is how you want to implement this simply from an HTTP perspective (not thinking about API Platform). Sometimes these things just *aren't* very RESTful. That's not idea... but you still gotta get your work…
weaverryan
weaverryan
Read Full Comment
…without authenticating, then you could choose to activate the "login" feature with a flag - e.g. ?auto_authenticate=1 to "activate" that feature. That's maybe not perfectly RESTful, but I think it's a fine thing to do. Let me know how it goes! Cheers!
weaverryan
weaverryan
Read Full Comment
…is (technically) one more - having the language in the URL - e.g. `/api/en/articles`, though this last one doesn't feel very RESTful to me (as it would mean that, in a philosophical level, `/api/en/articles/1` and `/api/es/articles/1` are…
weaverryan
weaverryan
Read Full Comment
…Use the Messenger integration with API Platform - by chance, their example is actually a password reset: https://api-platform.com/docs/core/messenger/ The last is the "best" option because this isn't a very RESTful operation, so adding a custom operation (B) is kind…
weaverryan
weaverryan
Read Full Comment
…concepts we're covering in this course are still relevant. So, if you just want to learn RESTful APIs and code along with us - you can continue using Silex and do exactly what we show in this screencasts- it's enough for learning purposes. Cheers!
…I tried the API Platform website, but it only shows how to install and configure. There are no further information to get started. Also Symfony RESTful API: Authentication with JWT (Course 4) doesn't seem much relevant to the API Platform. Thanks for your work!
…cover in a future tutorial. BUT, I'll give you some hints (but also, there is not one perfect answer). Creating a URL like /post/145/unpublish is not RESTful. So, you're "breaking" the rules... which you should avoid if you can... but also..…
weaverryan
weaverryan
Read Full Comment
…what you want with the setup you already have - but let me know if you hit issues or have questions. The non-RESTful part of this is the /products/{id}/image endpoint ... as what you're *really* doing by uploading is editing the Product resource…
weaverryan
weaverryan
Read Full Comment