Necessity of content-type for POST and DELETE method ( HTTP method of Route via HTTP(S) )
search cancel

Necessity of content-type for POST and DELETE method ( HTTP method of Route via HTTP(S) )

book

Article ID: 195237

calendar_today

Updated On:

Products

CA API Gateway API SECURITY CA API Gateway Precision API Monitoring Module for API Gateway (Layer 7) CA API Gateway Enterprise Service Manager (Layer 7) STARTER PACK-7 CA Microgateway

Issue/Introduction

Client   --à  API Gateway  --à Back end

 

Send the following request from the curl -v -k -X POST  <HostName:Port/ServiceName> -H 'Content-Type: application/json' .........

Request from Gateway to backend

POST /xxxx HTTP/1.1

accept: application/json

Content-Type: application/json

Content-Length: nn

Host: <HostName>

Connection: Keep-Alive

 

curl -v -k -X DELETE  <HostName:Port/ServiceName> -H 'Content-Type: application/json' 

Request from Gateway to backend

DELETE /xxxx HTTP/1.1

accept: application/json

Host: HostName

Connection: Keep-Alive

 

In case of POST method, content-type is included in the request header to the backend.

In case of DELETE method, content-type is not included in the request header to the backend.

 

 

Environment

Release : All

Component : API GATEWAY

Resolution

It is based on the specifications

The Route via HTTP(s) Assertion complies to RFC specification (https://tools.ietf.org/html/rfc7231#section-4.3) and DELETE method do not require a content-type as mandatory