Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
antSword
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
HuangJunbo
antSword
Commits
df6e6718
Commit
df6e6718
authored
Nov 27, 2018
by
Curz0n
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support 404 status
parent
35b5a635
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
request.js
modules/request.js
+3
-3
No files found.
modules/request.js
View file @
df6e6718
...
@@ -122,12 +122,12 @@ class Request {
...
@@ -122,12 +122,12 @@ class Request {
},
res
,
callback
);
},
res
,
callback
);
})
})
.
end
((
err
,
ret
)
=>
{
.
end
((
err
,
ret
)
=>
{
if
(
err
)
{
return
event
.
sender
.
send
(
'request-error-'
+
opts
[
'hash'
],
err
);
};
let
buff
=
ret
.
body
;
let
buff
=
ret
.
body
;
// 解码
// 解码
let
text
=
iconv
.
decode
(
buff
,
opts
[
'encode'
]);
let
text
=
iconv
.
decode
(
buff
,
opts
[
'encode'
]);
if
(
err
&&
text
==
""
)
{
return
event
.
sender
.
send
(
'request-error-'
+
opts
[
'hash'
],
err
);
};
// 回调数据
// 回调数据
event
.
sender
.
send
(
'request-'
+
opts
[
'hash'
],
{
event
.
sender
.
send
(
'request-'
+
opts
[
'hash'
],
{
text
:
text
,
text
:
text
,
...
...
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