dgs-framework icon indicating copy to clipboard operation
dgs-framework copied to clipboard

feature: please add DgsQueryExecutor.executeAndExtractJsonPath method overload that allows overriding WebRequest

Open iuliiasobolevska opened this issue 4 years ago • 1 comments

Please read our contributor guide before creating an issue. Also consider discussing your idea on the discussion forum first.

Describe the Feature Request

Please add DgsQueryExecutor.executeAndExtractJsonPath method overload that allows overriding WebRequest (similarly to DgsQueryExecutor.execute()).

The reason why overload with headers:

<T> T executeAndExtractJsonPath(String query, String jsonPath, HttpHeaders headers);

doesn't work is that we additionally need to set Cookies.

Currently, DgsQueryExecutor.executeAndExtractJsonPath() sets webRequest to null without a possibility to override it. As an alternative, we are using DgsQueryExecutor.execute() so it's nice-to-have feature request, not a blocker.

Describe Preferred Solution

Add and implement

<T> T executeAndExtractJsonPath(String query, String jsonPath, WebRequest webRequest);

Describe Alternatives

iuliiasobolevska avatar Sep 08 '21 01:09 iuliiasobolevska

Thanks for reporting!

srinivasankavitha avatar Sep 08 '21 16:09 srinivasankavitha

Feature is already implemented : executeAndExtractJsonPath(query: String, jsonPath: String, servletWebRequest: ServletWebRequest)

srinivasankavitha avatar Sep 08 '22 21:09 srinivasankavitha