DEV Community

Discussion on: Everything you need to know about an API

Collapse
 
contourintegral profile image

Note:

  1. JSON is NOT a programming language. It is something called a method of data serialisation, which means the data that we use is made so that it attains singularity with different types of circumstances. E.g.: The server is implemented in Python, the client uses JS. Both have native support for JSON, so they can work with the data without any further conversions.

  2. The PUT method is usually never used in production, because the new data is overwritten with the previous data, i.e., if you try to update the cart, you may even invalidate the logged in user in the first place! Therefore, the PATCH method is used, which changes the data in-place without any overwriting.

Collapse
 
abhirajb profile image
Abhiraj Bhowmick

Thanks for the info