I'm having an API endpoint defined in WSO2 EI Integration studio. When I send this endpoint a GET
request, the $axis2:ContentType
header of the request is getting null as soon as it comes inside the EI (Beginning of inSequence) . Is there a way to preserve this header and send it out of the EI. Any idea how to do this ?
NOTE: This is not happening for POST
requests.
API endpoint
<?xml version="1.0" encoding="UTF-8"?>
<api context="/eirouter_test" name="eirouter_test" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="POST GET">
<inSequence>
<log level="custom">
<property expression="$axis2:ContentType" name="original-content-type" />
</log>
<respond description="Send result to the client"/>
</inSequence>
<outSequence />
<faultSequence />
</resource>
</api>
Request CURL
curl --location --request GET 'http://localhost:8290/eirouter_test/eb805bbe-6c3e-414d-a380-857b6f89607c' \
--header 'Content-Type: application/json'
EI Logs
[2021-06-01 10:54:41,457] INFO {LogMediator} - {api:eirouter_test} original-content-type = null