v4.11.8 - Store HttpResponse header values #565
jongpie
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thanks so much to @TrangOul for suggesting this enhancement, providing Apex code snippets for the implementation, and helping with code review!
Core Unlocked Package Changes
New Feature: Store
HttpResponse
Header ValuesResolved Log headers from HttpResponse (and possibly HttpRequest) objects #561 (reported by @TrangOul) by adding new fields
LogEntryEvent__e.HttpResponseHeaders__c
andLogEntry__c.HttpResponseHeaders__c
that store the full key-value pair for each header set on the logged instance ofSystem.HttpResponse
. These fields are now automatically set when using the instance methodLogEntryEventBuilder.setHttpResponseDetails(System.HttpResponse)
.Header: value
to match the (HTTP standard). A\n
line break is used as a delimiter between each header when there are multiple headers.LoggerParameter__mdt
recordStoreHttpResponseHeaderValues
tofalse
. By default, this feature is enabled/set totrue
LogEntryEvent__e.HttpResponseHeaderKeys__c
andLogEntry__c.HttpResponseHeaderKeys__c
will continue to be populated. These fields store only the header keys, not the header values, and some orgs have existing tests & logic that rely on checking the logged keys. These fields are always populated for instances ofSystem.HttpResponse
, regardless of the configuration of the newLoggerParameter__mdt
recordStoreHttpResponseHeaderValues
.Updated permission sets
LoggerAdmin
andLoggerLogViewer
to haveread
access to the new fieldLogEntry__c.HttpResponseHeaders__c
.LoggerEndUser
intentionally does not have access to this field (or any other fields related toHttpResponse
orHttpRequest
).Added new field
LogEntry__c.HttpResponseHeaders__c
to the FlexiPageLogEntryRecordPage
. This field is shown in addition to the existing fieldLogEntry__c.HttpResponseHeaderKeys__c
, shown in the (massive 😅) screenshot belowUpdated Internal Coding Conventions for Apex
if
Statementsif
statements throughout the codebase to simplify checking Booleans fromif(condition == true)
to justif(condition)
. A few existing Booleans were also updated to have a default value to avoid issues withnull
values.Installation Info
Core Unlocked Package - no namespace
Full Changelog: v4.11.7...v4.11.8
sf package install --wait 20 --security-type AdminsOnly --package 04t5Y000001Oig9QAC
sfdx force:package:install --wait 20 --securitytype AdminsOnly --package 04t5Y000001Oig9QAC
This discussion was created from the release Store HttpResponse header values .
Beta Was this translation helpful? Give feedback.
All reactions