Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
1b33af4b
Commit
1b33af4b
authored
8 years ago
by
Nick Draper
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitignore
+2
-0
2 additions, 0 deletions
.gitignore
Framework/Kernel/inc/MantidKernel/GithubApiHelper.h
+0
-60
0 additions, 60 deletions
Framework/Kernel/inc/MantidKernel/GithubApiHelper.h
with
2 additions
and
60 deletions
.gitignore
+
2
−
0
View file @
1b33af4b
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Framework/Kernel/inc/MantidKernel/GithubApiHelper.h
deleted
100644 → 0
+
0
−
60
View file @
b18b6c06
#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_ */
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment