If you want to know what is the size of an HTTP/HTTPS request response-payload, you need to look at the content-length header from the response headers.
Example:% curl -sI "https://code.jquery.com/jquery-3.5.0.min.js"
HTTP/2 200
date: Wed, 30 Nov 2022 12:02:51 GMT
content-length: 89493
content-type: application/javascript; charset=utf-8
last-modified: Fri, 20 Aug 2021 17:47:53 GMT
accept-ranges: bytes
server: nginx
etag: W/"611feac9-15d95"
cache-control: max-age=315360000
cache-control: public
access-control-allow-origin: *
vary: Accept-Encoding
x-hw: 1669809771.dop244.fr8.t,1669809771.cds237.fr8.hn,1669809771.cds139.fr8.c
You can pipe it with grep command to just get the size of the response in bytes.
Exmple:% curl -sI "https://code.jquery.com/jquery-3.5.0.min.js" | grep content-length
content-length: 89493
Note: The way Content-Lenght is displayed in the HTTP response may differ in upper-lowercase, so it's better to make use of case-insensitivity options with grep.
% curl -sI "https://code.jquery.com/jquery-3.5.0.min.js" | grep -iF 'content-length'
content-length: 89493

Have Questions? Post them here!
- Get cURL command from Chrome Inspect Network HTTP URL
- Downloading Google Chrome using cURL Command
- Get the Size of HTTP Response using cURL Command (Content Length)
- How to set Connection and Max Timeout for cURL Request with Examples
- Hide cURL Outputs and Errors on Terminal
- cURL Example using IP (IPv4 and IPv6) address and Port
- Perform Basic Authentication using cURL with Examples
- Efficient way to perform HTTP cURL GET/POST Requests with Payload
- trurl: A new command-line tool for URL parsing and manipulation by cURL Developer
- Trace using cURL Command Example
- Fetch only content-type using cURL Command
- cURL Option to show HTTP Response Status Code
- [fix] command not found curl
- How to get cURL Command to run in verbose mode?
- Save cURL Command Output to a external file
- List of 28 Protocols supported by cURL with Examples
- URL Encode cURL HTTP GET\POST Data with Examples
- How to Pretty Print cURL JSON Output in Terminal
- How to open Notepad? - NotepadPlusPlus
- IntelliJ: Error: Could not find or load main class, java.lang.ClassNotFoundException - Java
- bash: cls: command not found - Linux
- HTML5 CSS3 Color Codes List - Html
- Remove Apps from Dock when Quit [Mac Ventura] - MacOS
- [Fix] MySQL Docker ERROR 1045 (28000): Access denied for user root@localhost (using password: YES/NO) - MySQL
- How to switch between sftp and Terminal shell - FTP
- How to Set Homepage on Chrome - Chrome