@rururu_kenken(nao)(調査中)reactor-nettyのリクエストヘッダーの初期値NettyLast updated at 2024-10-20Posted at 2024-10-20 項目 初期値 Connection 明示的に設定しない場合は、keep-alive Host HTTPヘッダーにキーが無い場合は、リクエストの送信先ホスト名とポートが自動で設定https://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientConnect.java#L541 User-Agent HTTPヘッダーにキーが無かったら設定される初期値の定数の値https://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java#L116public static final String USER_AGENT = String.format("ReactorNetty/%s", reactorNettyVersion());設定しているところhttps://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientConnect.java#L537例: User-Agent: ReactorNetty/1.0.0 Accept HTTPヘッダーにキーが無かったら設定される初期値の定数の値https://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientConnect.java#L694static final AsciiString ALL = new AsciiString("*/*");設定しているところhttps://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientConnect.java#L546例: Accept: */* Content-Length 値が設定されていてもHTTPのbodyのサイズで更新https://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientOperations.java#L857requestHeaders.setInt(HttpHeaderNames.CONTENT_LENGTH, body.readableBytes()); 0Go to list of users who liked0comment0Go to list of commentsRegister as a new user and use Qiita more convenientlyYou get articles that match your needsYou can efficiently read back useful informationYou can use dark themeWhat you can do with signing upSign upLogin