summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2022-08-08 02:50:11 +0300
committerEd Tanous <ed@tanous.net>2022-12-28 22:57:02 +0300
commited194be4aff97177c6062bad9e2372099f07cd3e (patch)
treec38a653d934ab4b458e6561e5363088269882960 /scripts
parent1c99da037b2242c6fbad3441038081c5703dc1e9 (diff)
downloadbmcweb-ed194be4aff97177c6062bad9e2372099f07cd3e.tar.xz
Add CBOR support
CBOR is a more efficient way to represent json, and something that, as you can see from this patch, is relatively trivial to implement in our current nlohmann json handlers. This allows users that specify an accepts header of "application/cbor" to request the BMC produce a cbor response. This feature adds 1520 bytes (1.48KB) to the binary size of bmcweb. For ServiceRoot GET /redfish/v1 Accepts: application/json - returns json GET /redfish/v1 Accepts: application/cbor - returns cbor GET /redfish/v1 Accepts: */* - returns json GET /redfish/v1 Accepts: text/html - returns html GET /redfish/v1 no-accepts header - returns json For service root, CBOR encoding drops the payload size from 1520 bytes on my system, to 1021 byes, which is a significant improvement in the number of bytes we need to compress. Redfish-service-validator passes. Signed-off-by: Ed Tanous <edtanous@google.com> Change-Id: I847e678cf79dfd7d55e6d3b26960c419e47063af
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions