Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
go-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
go-gitlab
Commits
d6c1e593
Commit
d6c1e593
authored
Mar 17, 2016
by
Michal Gebauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allow empty token
parent
480adfd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
gitlab.go
gitlab.go
+3
-1
No files found.
gitlab.go
View file @
d6c1e593
...
@@ -230,7 +230,9 @@ func (c *Client) NewRequest(method, path string, opt interface{}) (*http.Request
...
@@ -230,7 +230,9 @@ func (c *Client) NewRequest(method, path string, opt interface{}) (*http.Request
}
}
req
.
Header
.
Set
(
"Accept"
,
"application/json"
)
req
.
Header
.
Set
(
"Accept"
,
"application/json"
)
req
.
Header
.
Set
(
"PRIVATE-TOKEN"
,
c
.
token
)
if
c
.
token
!=
""
{
req
.
Header
.
Set
(
"PRIVATE-TOKEN"
,
c
.
token
)
}
if
c
.
UserAgent
!=
""
{
if
c
.
UserAgent
!=
""
{
req
.
Header
.
Set
(
"User-Agent"
,
c
.
UserAgent
)
req
.
Header
.
Set
(
"User-Agent"
,
c
.
UserAgent
)
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment