-end</code></pre><h2 id="Internal-APIs"><a class="docs-heading-anchor" href="#Internal-APIs">Internal APIs</a><a id="Internal-APIs-1"></a><a class="docs-heading-anchor-permalink" href="#Internal-APIs" title="Permalink"></a></h2><p>These 1.x internals are not migration targets for 2.0:</p><ul><li>layer-stack internals</li><li>connection-pool internals</li><li>parser internals</li><li>undocumented socket/TLS extension points</li></ul><p>Move those call sites to documented <code>Client</code>, <code>Transport</code>, <code>Stream</code>, server, router, WebSocket, or SSE APIs. If a 1.x internal use case cannot be expressed through the 2.0 public surface, open an issue with the use case rather than depending on the new internals.</p><h2 id="Compatibility-Keywords"><a class="docs-heading-anchor" href="#Compatibility-Keywords">Compatibility Keywords</a><a id="Compatibility-Keywords-1"></a><a class="docs-heading-anchor-permalink" href="#Compatibility-Keywords" title="Permalink"></a></h2><p>HTTP.jl 2.0 accepts several old client keywords so existing code fails less abruptly:</p><ul><li><code>readtimeout</code>: maps to <code>read_idle_timeout</code></li><li><code>pool</code>: accepted, but use <code>client</code> / <code>transport</code></li><li><code>retry_delays</code> and <code>retry_check</code>: accepted, but use <code>retry_if</code>, <code>retries</code>, and <code>retry_bucket</code></li><li><code>sslconfig</code> and <code>socket_type_tls</code>: accepted, but configure the transport</li><li><code>copyheaders</code>, <code>canonicalize_headers</code>, <code>detect_content_type</code>, <code>observelayers</code>, <code>logerrors</code>, and <code>logtag</code>: accepted for compatibility, but not the preferred 2.0 observation/configuration surface</li></ul><p>Treat these as temporary migration aids. New code should use the documented 2.0 API names.</p><h2 id="Final-Checklist"><a class="docs-heading-anchor" href="#Final-Checklist">Final Checklist</a><a id="Final-Checklist-1"></a><a class="docs-heading-anchor-permalink" href="#Final-Checklist" title="Permalink"></a></h2><ul><li>Prefer <code>resp.status</code>; <code>resp.status_code</code> remains available as a compatibility alias.</li><li>Use <code>HTTP.get_request_context(req)</code> for cancellation/deadline state.</li><li>Prefer keyword constructors for <code>Request</code> and <code>Response</code>.</li><li>Replace <code>pool</code> usage with a long-lived <code>HTTP.Client</code>.</li><li>Replace <code>readtimeout</code> with the precise timeout keyword you need.</li><li>Replace <code>HTTP.Exceptions.StatusError</code> & friends with the top-level <code>HTTP.StatusError</code>; <code>HTTP.RequestError</code> is gone — catch the underlying exception or use <code>HTTP.isrecoverable</code>.</li><li>Replace <code>HTTP.download</code> with <code>Downloads.download</code> or an explicit <code>HTTP.request(...; response_stream = io)</code> file stream.</li><li>Move WebSocket code to <code>HTTP.WebSockets</code>.</li><li>Replace <code>Sockets.getpeername(stream)</code> with <code>HTTP.peeraddr(stream)</code>.</li><li>Replace internal parser/connection/HPACK/HTTP2 usage with documented APIs.</li><li>Run integration tests for redirects, retries, proxy configuration, cookies, streaming, WebSockets, SSE, and HTTP/2 after upgrading.</li></ul></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../protocols/">« Protocols</a><a class="docs-footer-nextpage" href="../../api/reference/">Overview »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.17.0 on <span class="colophon-date" title="Friday 3 July 2026 12:18">Friday 3 July 2026</span>. Using Julia version 1.12.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0 commit comments