Skip to content

Commit

Permalink
Added HTTP headers to incoming metadata JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Nov 12, 2024
1 parent 2f71ca5 commit 9cab722
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ public static IJsonObject getIncomingMetadataAsJson (@Nonnull final IAS4Incoming
if (aArray.isNotEmpty ())
aMap.addJson ("Cookies", aArray);
}
{
final IJsonArray aArray = new JsonArray ();
for (final var aHeader : aMessageMetadata.getAllHttpHeaders ())
{
final IJsonObject aObj = new JsonObject ();
aObj.add (aHeader.getKey (), new JsonArray ().addAll (aHeader.getValue ()));
aArray.add (aObj);
}
if (aArray.isNotEmpty ())
aMap.addJson ("HttpHeaders", aArray);
}
return aMap;
}
}

0 comments on commit 9cab722

Please sign in to comment.