Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weixin_authorize
Overview
Overview
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
weixin_authorize
Commits
0890bd17
Commit
0890bd17
authored
Apr 02, 2014
by
lanrion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor http_post headers params
parent
67610f42
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
lib/weixin_authorize.rb
+1
-1
lib/weixin_authorize/client.rb
+1
-1
No files found.
lib/weixin_authorize.rb
View file @
0890bd17
...
...
@@ -17,7 +17,7 @@ module WeixinAuthorize
def
http_post_without_token
(
url
,
payload
=
{},
headers
=
{},
endpoint
=
"plain"
)
post_api_url
=
endpoint_url
(
endpoint
,
url
)
payload
=
MultiJson
.
dump
(
payload
)
if
endpoint
==
"plain"
# to json if invoke "plain"
load_json
(
RestClient
.
post
(
post_api_url
,
payload
,
headers
))
load_json
(
RestClient
.
post
(
post_api_url
,
payload
,
:params
=>
headers
))
end
# return hash
...
...
lib/weixin_authorize/client.rb
View file @
0890bd17
...
...
@@ -45,7 +45,7 @@ module WeixinAuthorize
end
def
http_post
(
url
,
payload
=
{},
headers
=
{},
endpoint
=
"plain"
)
headers
=
{
:params
=>
access_token_param
.
merge
(
headers
)}
headers
=
access_token_param
.
merge
(
headers
)
WeixinAuthorize
.
http_post_without_token
(
url
,
payload
,
headers
,
endpoint
)
end
...
...
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