Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nodemanager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
nodemanager
Commits
20a90af6
Commit
20a90af6
authored
May 21, 2024
by
vicotor
2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update post
parent
9b00464f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
post.go
utils/post.go
+9
-7
No files found.
utils/post.go
View file @
20a90af6
package
utils
package
utils
import
(
import
(
"
github.com/astaxie/beego/httplib
"
"
bytes
"
log
"github.com/sirupsen/logrus
"
"net/http
"
)
)
func
Post
(
url
string
,
data
[]
byte
)
error
{
func
Post
(
url
string
,
data
[]
byte
)
error
{
log
.
WithFields
(
log
.
Fields
{
tr
:=
&
http
.
Transport
{
"url"
:
url
,
DisableKeepAlives
:
true
,
"datalen"
:
len
(
data
),
}
})
client
:=
&
http
.
Client
{
Transport
:
tr
}
_
,
err
:=
httplib
.
Post
(
url
)
.
Body
(
data
)
.
Response
()
resp
,
err
:=
client
.
Post
(
url
,
"raw"
,
bytes
.
NewBuffer
(
data
))
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
}
}
defer
resp
.
Body
.
Close
()
return
nil
return
nil
}
}
vicotor
@luxueqian
mentioned in commit
8b527877
·
May 21, 2024
mentioned in commit
8b527877
mentioned in commit 8b52787705fcfaf421d62f0529694a40a6a25bc9
Toggle commit list
vicotor
@luxueqian
mentioned in commit
8c0165f6
·
Jun 07, 2024
mentioned in commit
8c0165f6
mentioned in commit 8c0165f6241f599e289ad8a7d4b43a01bf72b39e
Toggle commit list
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