1 //! \file CurlWikiGrabber.h
3 #ifndef WIKIWALKER_CURL_WIKI_GRABBER_H
4 #define WIKIWALKER_CURL_WIKI_GRABBER_H
10 //! Class responsible for grabbing the contents / links of an article
14 /*! Create a new instance.
15 * Might throw an exception, if curl intialization failed
21 //! Explicitely delete copy constructor, because curl handle
22 CurlWikiGrabber(const CurlWikiGrabber
& other
) = delete;
23 //! Explicitely delete move constructor, because curl handle
24 CurlWikiGrabber(CurlWikiGrabber
&& other
) = delete;
26 //! Explicitely delete copy assignment operator, because curl handle
27 CurlWikiGrabber
& operator=(const CurlWikiGrabber
& other
) = delete;
28 //! Explicitely delete move assignment operator, because curl handle
29 CurlWikiGrabber
& operator=(CurlWikiGrabber
&& other
) = delete;
31 /*! given an URL, return article JSON data
32 * \param url URL of the article
33 * \returns article JSON data
35 std::string
grabUrl(const std::string
& url
) const;
37 /*! Set whether to skip SSL verification.
38 * \param state whether to skip SSL verification
39 * this was added because vcpkg's libcurl doesn't have
40 * a default CA certificate lookup path.
42 void skipSslVerification(bool state
);
45 bool skipSslVerificationState_
{false};
47 } // namespace WikiWalker
48 #endif // WIKIWALKER_CURL_WIKI_GRABBER_H