This update features a slew of enhancements and fixes primarily aimed at smoothing API interactions.
- Added
DecodeJwt()to return an unobfuscatedMapof the input JWT token. DecodeBase64()accepts a third parameter to mark the input as Base64URL, which will do a couple extra pre-transformations before decoding as Base64.Timestamp()now accepts a parameter to return multiple common internet standard formats.- Acceptable paramaters:
Readable,SQL,ODBC,RFC 3339,Unix,asctime,RFC 1123,RFC 2822,FILETIME,EXIF, andRFC 850. See that method for output examples.
- Acceptable paramaters:
SetPost()now returns the input's mimetype. This is useful for persnickety servers demanding an exactContent-Typeto be reported in the headers.- Due to a behavioral quirk in libmagic, json data examined in memory is reported as
text/plain. However, since passing an Object/Map/Array always results in a dumped json being staged, there is a specific override for that group which returnsapplication/json.
- Due to a behavioral quirk in libmagic, json data examined in memory is reported as
SetPost()now explicitly sets CUSTOMREQUEST to POST. This fixed a bug where POSTs would fail after GETs were sent after POSTs were sent.- ...yeah that was as dumb as you might imagine to track down.
- Fixed
SetPost()unintentionally assigning POST data to the default handle ClearPost()now also zeros libcurl's UPLOAD flag.ClearPost()now explicitly sets CUSTOMREQUEST to GET for more intuitive behavior in mixed-request usage.