Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aurélien Vermylen
jio
Commits
e34cc4eb
Commit
e34cc4eb
authored
Aug 31, 2013
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
little to guess command action according to http status added
parent
d2c5f881
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
src/jio/core/util.js
src/jio/core/util.js
+13
-1
No files found.
src/jio/core/util.js
View file @
e34cc4eb
/*jslint indent: 2, maxlen: 80, nomen: true, sloppy: true */
/*jslint indent: 2, maxlen: 80, nomen: true, sloppy: true */
/*global exports, Blob, FileReader, Deferred, hex_sha256, XMLHttpRequest */
/*global exports, Blob, FileReader, Deferred, hex_sha256, XMLHttpRequest,
constants */
/**
/**
* Do not exports these tools unless they are not writable, not configurable.
* Do not exports these tools unless they are not writable, not configurable.
...
@@ -424,3 +425,14 @@ function methodType(method) {
...
@@ -424,3 +425,14 @@ function methodType(method) {
return
'
unknown
'
;
return
'
unknown
'
;
}
}
}
}
/**
* Return 'success', 'error' or 'retry' according to a http status.
*
* @param {Number} status The http status
* @return {String} The command action string
*/
function
guessCommandFromStatus
(
status
)
{
return
constants
.
http_action
[
status
||
0
];
}
exports
.
util
.
guessCommandFromStatus
=
guessCommandFromStatus
;
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