Closed mathieutho closed 1 year ago
Hello Mathieu !
Considering you have already identified the fix, would you be open to making a pull request ? 🙂
Hello David,
I created a pull request #277
Have fun to review it ;)
Thank you
v0.7.1 of proxy packaging including your fix has been published ! 👏
Thanks again ;)
Hello,
I encourter the following issue.
Description
I call the proxy with headers
Accept: application/xml
andContent-Type: application/xml
like this:curl --request GET \ --url 'http://localhost:3000/proxy?serviceId=REFLECTION&target=%3FqueryParam1%3Dtoto%26queryParam2%3Dtata' \ --header 'Accept: application/xml' \ --header 'Content-Type: application/xml' \ --header 'my-custom-header: TOTO' \ --data '<note>reflection</note>'
The
REFLECTION
service just prints the request as the following:{ "method": "GET", "headers": { "content-length": "70", "content-type": "application/json", "my-custom-header": "TOTO", "accept": "application/json", "cookie": "", "user-agent": "insomnia/2022.6.0", "host": "localhost:3000", "connection": "close" }, "query": { "queryParam1": "toto", "queryParam2": "tata" }, "body": "<note>reflection</note>" }
Current behaviour
The headers
Accept
andContent-Type
received by the service areapplication/json
.Waited behaviour
The headers
Accept
andContent-Type
received by the service should beapplication/xml
.Request
Is it possible to use the client request headers
Accept
andContent-Type
if they are provided? https://github.com/Finastra/finastra-nodejs-libs/blob/1d53f2e73bde5092bca49cf6fb0f974d056b7114/libs/proxy/src/services/proxy.service.ts#L77 https://github.com/Finastra/finastra-nodejs-libs/blob/1d53f2e73bde5092bca49cf6fb0f974d056b7114/libs/proxy/src/services/proxy.service.ts#L78Thank you