mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Temporary cache data using POST method #368
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @devmariodiaz on GitHub (Oct 14, 2021).
Hello Stef,
Hoping that everything is doing well.
I have a question: WireMock is able to store temporary cache when we are using POST or any operation?
@devmariodiaz commented on GitHub (Oct 19, 2021):
Hello Stef, hopping that you are doing well
I would like ask you if Is there any update about this feature?
@StefH commented on GitHub (Oct 19, 2021):
Hello Mario,
I'm not sure I fully understand your request.
Can you provide an example / use-case scenario?
@devmariodiaz commented on GitHub (Oct 19, 2021):
Hello Stef, Thanks for always your quick answers.
For example, I will send some data using POST/PUT or another HTTP method, I want that this data can be stored in a kind of cache for a determined time inside a based WireMock solution.
i. e:
I will send the data as follows:
To for example this endpoint:
POST /someEndpoint/customer
I want to store this data temporarily, for one day, to be found after.
@StefH commented on GitHub (Oct 20, 2021):
Hello Mario,
In that case, there should be an option to provide the start-time, end-time or expiration-time.
Proposal:
In the Mapping you can provide the start-time and end-time when this mapping should be used
And you can also only provide the TTL / TimeToLive
Would this work for you?
@StefH commented on GitHub (Oct 20, 2021):
@devmariodiaz
I've created a new preview version :
1.4.24-ci-15508.Use TimeSettings -->
@devmariodiaz commented on GitHub (Oct 20, 2021):
Hello Stef,
Thanks for your always quick answers.
I have been testing this preview, but, I don't understood how works this implemented feature.
i. e: I used this canned data JSON:
@StefH commented on GitHub (Oct 21, 2021):
@devmariodiaz
To make sure you have the correct version, there is a new vetrsion :
1.4.24-ci-15516. Please try that.In your example, when you add that mapping and send a POST request, WireMock.Net will return a 404 because now (2021 21 oktober) does not fall in the Start and End range.
@AndresGMD commented on GitHub (Oct 26, 2021):
Hi Stef,
I have the WireMock Version running on MAC Big Sur
This is my Canned Data
How I check if this feature Works? This is my response regarding cache.
Thanks a Lot
@StefH commented on GitHub (Oct 27, 2021):
For testing this specific functionality, you need that exact version:

(Note that only this version has your requested logic)
If that does not work work you, I'll merge the PR and create a new official NuGet.
@AndresGMD commented on GitHub (Oct 27, 2021):
Thanks Stef,
I've just available these versions:
I would appreciate if you merge in a new version. Thanks in advance
@StefH commented on GitHub (Oct 27, 2021):
Official NuGet 1.4.25 will be available in a few minutes.