XRootD
XrdClHttpHeaderCallout.hh
Go to the documentation of this file.
1 /***************************************************************
2  *
3  * Copyright (C) 2025, Morgridge Institute for Research
4  *
5  ***************************************************************/
6 
7 #ifndef XRDCLHTTP_CURLHEADER_CALLOUT_HH
8 #define XRDCLHTTP_CURLHEADER_CALLOUT_HH
9 
10 #include <memory>
11 #include <string>
12 #include <utility>
13 #include <vector>
14 
15 namespace XrdClHttp {
16 
18 public:
19  // A list of headers, represented as pairs of strings (name, value).
20  using HeaderList = std::vector<std::pair<std::string, std::string>>;
21 
22  virtual ~HeaderCallout() noexcept = default;
23 
24  // Return a header list based on the HTTP `verb`, `url`, and existing headers.
25  virtual std::shared_ptr<HeaderList> GetHeaders(const std::string &verb, const std::string &url, const HeaderList &headers) = 0;
26 };
27 
28 }
29 
30 #endif // XRDCLHTTP_CURLHEADER_CALLOUT_HH
virtual ~HeaderCallout() noexcept=default
virtual std::shared_ptr< HeaderList > GetHeaders(const std::string &verb, const std::string &url, const HeaderList &headers)=0
std::vector< std::pair< std::string, std::string > > HeaderList