GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Illustrate the right way to send a GET request (#13282) · netty/netty@97f7401

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • example/src/main/java/io/netty/example/http/upload
    • HttpUploadClient.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎example/src/main/java/io/netty/example/http/upload/HttpUploadClient.java‎

Copy file name to clipboardExpand all lines: example/src/main/java/io/netty/example/http/upload/HttpUploadClient.java
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
import io.netty.channel.nio.NioEventLoopGroup;
2323
import io.netty.channel.socket.nio.NioSocketChannel;
2424
import io.netty.handler.codec.http.DefaultHttpRequest;
25+
import io.netty.handler.codec.http.LastHttpContent;
2526
import io.netty.handler.codec.http.HttpHeaderNames;
2627
import io.netty.handler.codec.http.HttpHeaderValues;
2728
import io.netty.handler.codec.http.HttpHeaders;
@@ -187,7 +188,8 @@ private static List<Entry<String, String>> formget(
187188
);
188189

189190
// send request
190-
channel.writeAndFlush(request);
191+
channel.write(request);
192+
channel.writeAndFlush(LastHttpContent.EMPTY_LAST_CONTENT);
191193

192194
// Wait for the server to close the connection.
193195
channel.closeFuture().sync();

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.