Skip to content

[v0.8.4] Add HTTPS agent and PATCH method support- #295

Choose a tag to compare

@FelipeRamosDev FelipeRamosDev released this 05 Aug 18:10
3e7d70d

This pull request updates the 4Hands API to version 0.8.4 and introduces improvements to the AJAX service, focusing on enhanced HTTPS agent handling and expanded HTTP method support. The most important changes are summarized below.

Version Updates

  • Updated the version in both README.md and package.json from 0.8.3 to 0.8.4 to reflect the new release. [1] [2]

AJAX Service Enhancements (client/services/AJAX.js)

HTTPS Agent Handling

  • Improved the logic for setting the httpsAgent and httpAgent properties: now, if NODE_ENV is 'production', requests will always reject unauthorized SSL certificates, increasing security in production environments. [1] [2]
  • Ensured that all HTTP methods (get, post, put, patch, delete, and file uploads) consistently use the correct agent settings by passing httpsAgent and httpAgent in every request. [1] [2] [3] [4] [5]

Expanded HTTP Method Support

  • Added a new patch method to support HTTP PATCH requests, including authentication handling.
  • Added a new authPatch method to perform authenticated PATCH requests, mirroring the pattern used for other HTTP verbs.