Let's see an example of how you can get the HTTP Request or Response headers in Safari web browser for macOS,
Let's open Safari and visit google.com and search for the team java and see what the request-response headers are,
![Safari - Request Response Header Example Safari - Request Response Header Example](https://code2care.org/macos/get-http-request-response-headers-safari/images/Safari - Request Response Header Example.gif)
Safari - Request Response Header Example
As you can see in the above gif example, right-click on the webpage and select "Inspect element", go to the network tab, you may see a lot of entries of all kind of files loaded: CSS, images, javaScript, etc, you can select the Documents tab just to see the webpages request - click on Headers and you would see the Request and Response headers.
Request::method: GET
:scheme: https
:authority: www.google.com
:path: /search?q=java&client=safari&sxsrf=xxx%xxx&ei=xxx-EPxtaMuAg&oq=java&gs_lcp=xxx&sclient=gws-wiz&ved=xxx
Cookie: CGIC=XXX
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Host: www.google.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15
Accept-Language: en-us
Referer: https://www.google.com/
Connection: keep-alive
Response:
:status: 200
Content-Type: text/html; charset=UTF-8
Set-Cookie: 1P_JAR=2021-07-25-10; expires=Tue, 24-Aug-2021 10:47:57 GMT; path=/; domain=.google.com; Secure; SameSite=none
Set-Cookie: SIDCC=xxx; expires=Mon, 25-Jul-2022 10:47:57 GMT; path=/; domain=.google.com; priority=high
Set-Cookie: __Secure-3PSIDCC=xxx; expires=Mon, 25-Jul-2022 10:47:57 GMT; path=/; domain=.google.com; Secure; HttpOnly; priority=high; SameSite=none
Date: Sun, 25 Jul 2021 10:47:57 GMT
X-Frame-Options: SAMEORIGIN
Content-Encoding: gzip
X-XSS-Protection: 0
Cache-Control: private, max-age=0
Expires: -1
Server: gws
Strict-Transport-Security: max-age=31536000
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Comments:
- Further comments disabled!
More Posts related to MacOS,
- Fix: grunt: command not found (Mac/Windows)
- AppleScript Example with TextEdit
- How to copy Password of Wifi on your Mac
- Install OpenJDK Java (8/11/17) versions using brew on Mac (Intel/M1/M2)
- How to check if a port is in use using terminal [Linux or macOS]
- Cut, Copy and Paste Keyboard Shortcuts on Mac Keyboard
- [macOS] NetBeans IDE cannot be installed. Java (JRE) found on your computer but JDK XX or newer is required.
- How to Remove Widgets from macOS Sonoma 14 Desktop
- Turn off Auto-Capitalization on macOS Ventura 13
- How to Go To /usr/local/bin on Mac Terminal?
- How to Open TextEdit on Mac
- Mac: How to Open Android Studio from Terminal
- How to change the default location of Mac Screenshot
- Display Seconds in Digital Clock on Mac Menu Bar [macOS]
- How to install homebrew (brew) on M1 Mac
- Must Know Homebrew Commands for Mac/Linux Users
- Steps to Uninstall Roblox on Mac (macOS)
- How to change the System Settings Sidebar icon size Mac Ventura 13
- How to set Out Of Office (OOO) on Outlook for Mac [Updated 2023]
- Trigger Notification Center Message using Mac Terminal Command
- [fix] macOS Ventura - Python3 xcrun: error: invalid active developer path missing xcrun at CommandLineTools
- How to Install Rust Language on Mac (macOS)
- How to minimize all Windows in Mac
- Display ls command file sizes in KB (kilobytes) MB (megabytes) or GB (gigabytes) [Linux/macOS]
- How to make TextEdit the default text Editor on Mac
More Posts:
- Create S3 bucket and upload files using AWS Toolkit for Visual Studio Code - AWS
- How to get UTC (GMT) time using JavaScript - JavaScript
- How to take user input from the console in a Python program - Python
- [fix] URI is not registered (Settings | Languages & Frameworks | Schemas and DTDs) IntelliJ - Java
- Android Error Unexpected cast to Button: layout tag was FrameLayout - Android
- Android M cannot run app using play button : Android Studio - Android
- [fix] iCloud - Verification Failed: An unknown error occurred Apple ID - iOS
- Steps to Install Jenkins on M1/M2 Mac - MacOS