From 3da85c5ee298caa202a0acfa9593adad75c1917e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mili=C4=87?= Date: Mon, 19 Sep 2022 12:36:43 +0200 Subject: [PATCH] docfix/Add comments regarding request headers info box --- src/main/scala/code/lib/ObpAPI.scala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/scala/code/lib/ObpAPI.scala b/src/main/scala/code/lib/ObpAPI.scala index fb8be40d..82817a8d 100644 --- a/src/main/scala/code/lib/ObpAPI.scala +++ b/src/main/scala/code/lib/ObpAPI.scala @@ -701,6 +701,9 @@ object OBPRequest extends MdcLoggable { addAppAccessIfNecessary.foreach(header => request.setRequestProperty(header.key, header.value)) + // Please note that this MUST be called before we set the body of our request + // Otherwise it can fail due to IllegalStateException("Already connected") + // In the end we cannot see info at Request Header's Box at API Explorer val requestHeaders = tryo { addAppAccessIfNecessary.map(header => (header.key, Set(header.value))) ::: request.getRequestProperties().asScala.mapValues(_.asScala.toSet).toList