- Building RESTful Web Services with PHP 7
- Haafiz Waheed ud din Ahmad
- 74字
- 2021-07-03 00:02:21
Updating a comment
- Request: PATCH /comment/1?comment="Modified%20Awesome%20Comment' HTTP/1.1
- Response:
{id:1, post_id:1, comment:"Modified Awesome Comment", link: "/comments/1"}
- Response code: 200 OK
Here, we used PATCH as we want to update a single attribute of a comment that is a comment. Also, you can see %20 passed in a new comment. So, %20 is just a replacement for a space as a URL cannot contain spaces. So with URL encoding, spaces should always be replaced by %20.
推薦閱讀
- TensorFlow Lite移動端深度學習
- Mastering Scientific Computing with R
- Learning AndEngine
- Java EE核心技術與應用
- Mastering Linux Security and Hardening
- Vue.js 2 Web Development Projects
- RocketMQ實戰與原理解析
- 遠方:兩位持續創業者的點滴思考
- ASP.NET求職寶典
- STM8實戰
- Java程序設計教程
- Implementing Microsoft Dynamics NAV(Third Edition)
- Web開發的平民英雄:PHP+MySQL
- PHP+MySQL Web應用開發教程
- 絕密原型檔案:看看專業產品經理的原型是什么樣