Skip to content

Commit

Permalink
read json string directly from file
Browse files Browse the repository at this point in the history
  • Loading branch information
gunplar committed Nov 17, 2023
1 parent fd6b34f commit 7ca41df
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ public void tc0300_testCreateFeaturesWithNewIds() throws Exception {

// Given: Space (uses above EventHandler) configured in Admin storage
final Space space = parseJsonFileOrFail("TC0300_createFeaturesWithNewIds/create_space.json", Space.class);
final String spaceJsonString = loadFileOrFail("TC0300_createFeaturesWithNewIds/create_space.json");
request = HttpRequest.newBuilder(stdHttpRequest, (k, v) -> true)
.uri(new URI(nakshaHttpUri + "hub/spaces"))
.POST(HttpRequest.BodyPublishers.ofString(space.toString()))
.POST(HttpRequest.BodyPublishers.ofString(spaceJsonString))
.header(HDR_STREAM_ID, streamId)
.build();
response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());
Expand Down

0 comments on commit 7ca41df

Please sign in to comment.