Best Practices to follow while writing REST WS :
Form encoding while making POST requests :
When you make a POST request, you have to encode the data that forms the body of the request in some way.
HTML forms provide three methods of encoding.
multipart/form-data if the request contains a File upload and it should be used in combination with the INPUT element, type=”file”.
application/x-www-form-urlencoded otherwise, which is the default if you omit enctype header in the request.
NEVER use text/plain as it only used if you want to debug the payload you are sending as part of HTTP request.
URL Encode Query params : When sending requests to REST API from POSTMAN, make sure you URL-Encode the query parameters part of the request.