# general

Venkatesh Satturi

01/26/2023, 9:37 PM
Hi Guys, I'm looking for help on creating dynamic response by reading query parameter to java variable and fetching the mock data from db, I'm unable to save the query / path param to a variable. Any help on this


01/27/2023, 3:18 PM
Hi @Venkatesh Satturi you would need to write an extension to achieve this, since currently WireMock is stateless except for scenarios (which are simple finite state machines, rather than data stores).
Would be curious to know what your use case is? Often we find it’s possible to achieve what you need without resorting to full state management.

Venkatesh Satturi

01/27/2023, 11:14 PM
@Tom - Thanks for replying. Our use case is simple, we want the mock response to be dynamic based on the values fetched from db where the query param value is a primary key