Closed Westlad closed 3 years ago
Perhaps the 'API' section of the README could be updated to reflect this update? At the moment it specifies that GET requests should specify data in req.body.
For completeness, I've checked the /merkleTree
and /metadata
routes and those GET requests already don't use req.body
, which is good. Some of them use req.params
instead of req.query
, which could be unconventional, and which might need a separate Issue opening to address.
For completeness, I've checked the
/merkleTree
and/metadata
routes and those GET requests already don't usereq.body
, which is good. Some of them usereq.params
instead ofreq.query
, which could be unconventional, and which might need a separate Issue opening to address.
req.params is when you are doing a GET to a restful endpoint like /getStockLevel/:sku It returns the value of 'sku' in this example.
:tada: This PR is included in version 3.0.4 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:
Timber expects GET requests, with accompanying data, to place that data in the request body. This is not really a supported http approach and some http clients will fail to package data in this way. This fix adds the option to pass data as GET query parameters. The code checks to see if the required data was passed in the body or as a query and thus is backwards compatible.