Skip to content
Snippets Groups Projects
Commit 1b33af4b authored by Nick Draper's avatar Nick Draper
Browse files

Reverse last change, instead add the generated file to gitignore

re #16519
parent b18b6c06
No related branches found
No related tags found
No related merge requests found
......@@ -167,6 +167,8 @@ Desktop.ini
.tags
.tags_sorted_by_file
#Dynamically created files
Framework/Kernel/inc/MantidKernel/GitHubApiHelper.h
Vates/VatesSimpleGui/ViewWidgets/inc/MantidVatesSimpleGuiViewWidgets/LibHelper.h
......
#ifndef MANTID_KERNEL_GitHubApiHelper_H_
#define MANTID_KERNEL_GitHubApiHelper_H_
#include "MantidKernel/InternetHelper.h"
namespace Mantid {
namespace Kernel {
/** GitHubApiHelper : A helper class for supporting access to the github api
through HTTP and HTTPS, inherits from the InternetHelper.
This class automatically adds the authorization to a read only account.
Copyright © 2016 ISIS Rutherford Appleton Laboratory, NScD Oak Ridge
National Laboratory & European Spallation Source
This file is part of Mantid.
Mantid is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
Mantid is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
File change history is stored at: <https://github.com/mantidproject/mantid>
Code Documentation is available at: <http://doxygen.mantidproject.org>
*/
class MANTID_KERNEL_DLL GitHubApiHelper : public InternetHelper {
public:
GitHubApiHelper();
GitHubApiHelper(const Kernel::ProxyInfo &proxy);
virtual ~GitHubApiHelper();
void reset() override;
bool isAuthenticated();
protected:
virtual void processResponseHeaders(const Poco::Net::HTTPResponse &res) override;
virtual int sendRequestAndProcess(Poco::Net::HTTPClientSession &session,
Poco::URI &uri, std::ostream &responseStream) override;
private:
int processAnonymousRequest(const Poco::Net::HTTPResponse &response,
Poco::URI &uri,
std::ostream &responseStream);
void addAuthenticationToken() {
addHeader("Authorization",
"token ****INSERT TOKEN HERE *****");
}
};
} // namespace Kernel
} // namespace Mantid
#endif /* MANTID_KERNEL_GitHubApiHelper_H_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment