sdk_java icon indicating copy to clipboard operation
sdk_java copied to clipboard

Custom headers don't override the default ones

Open panovitch opened this issue 4 years ago • 0 comments

Steps to reproduce:

  1. Pass a custom header to override the default one, e.g. client-request-id:
Payment.create(
    new Amount("123", "EUR"),
    new Pointer("IBAN", "mockiban"),
    "description",
    123,
    null,
    null,
    false,
    Map(
      BunqHeader.CLIENT_REQUEST_ID.toString -> "123"
    ).toJava)

What should happen:

  1. The specified request header gets passed to the server, and the server recognises the Client Request ID.

What happens:

  1. The server doesnt recognise the passed client request ID, and doesnt deduplicate the requests. Upon further investigation, I found out that the new header value gets appended to the header key, instead of replacing it.

Traceback

SDK version and environment

  • Tested on 1.14.1
  • [x] Sandbox
  • [x] Production

Response id

  • Response id:

Extra info:

panovitch avatar Jul 14 '21 11:07 panovitch