What is the purpose of the "Content-Type" header in RESTful API requests?

  • Define the format of the request body
  • Determine the API endpoint being accessed
  • Indicate the HTTP method being used
  • Specify the type of authentication used
The "Content-Type" header in RESTful API requests specifies the format of the data being sent in the request body. For example, it can be "application/json" for JSON data or "application/xml" for XML data.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *