• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: etag-compare
5Arg: <file>
6Help: Pass an ETag from a file as a custom header
7Protocols: HTTP
8Added: 7.68.0
9Category: http
10Multi: single
11See-also:
12  - etag-save
13  - time-cond
14Example:
15  - --etag-compare etag.txt $URL
16---
17
18# `--etag-compare`
19
20This option makes a conditional HTTP request for the specific ETag read
21from the given file by sending a custom If-None-Match header using the
22stored ETag.
23
24For correct results, make sure that the specified file contains only a
25single line with the desired ETag. An empty file is parsed as an empty
26ETag.
27
28Use the option --etag-save to first save the ETag from a response, and
29then use this option to compare against the saved ETag in a subsequent
30request.
31