Skip to content

Commit 734c57b

Browse files
committed
Use null to instead of empty string value.
1 parent d26ad9f commit 734c57b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/tinystruct/net/handlers/HTTPHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ public HTTPResponse(HttpResponse<InputStream> response) {
285285
this.body = new String(decodedStream.readAllBytes(), StandardCharsets.UTF_8);
286286
decodedStream.close();
287287
} else {
288-
this.body = "";
288+
this.body = null;
289289
}
290290
} catch (IOException e) {
291291
throw new ApplicationRuntimeException(e);
@@ -298,7 +298,7 @@ public HTTPResponse(HttpResponse<InputStream> response) {
298298
public HTTPResponse(HttpResponse<InputStream> response, Consumer<String> onMessage) {
299299
this.statusCode = response.statusCode();
300300
this.headers = response.headers().map();
301-
this.body = ""; // SSE mode does not return the entire body content.
301+
this.body = null; // SSE mode does not return the entire body content.
302302

303303
handleSSE(response, onMessage);
304304
}

0 commit comments

Comments
 (0)