Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

set default content-type

Hi,

When using the 'Extract Variables' policy to extract a JSON payload, it wont extract any variables in case the Content-Type is not set. While I understand why, I have two questions;

  1. Is it a good practice to set a default value in the API for the Content-Type in case the header was not supplied? Or should I send a HTTP 400?
  2. Can I expect that most clients actually send the correct Content-Type header? For example, Postman doesnt by default.

thanks and kind regards,

Guy

1 1 1,067
1 REPLY 1