Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
opening-hours
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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
regionalkauf
opening-hours
Commits
e3c867a5
Commit
e3c867a5
authored
Jul 09, 2014
by
Johannes Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
after cb refactor
parent
d1b5b124
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
restRequests.js
lib/restRequests.js
+8
-3
No files found.
lib/restRequests.js
View file @
e3c867a5
var
http
=
require
(
'http'
);
var
hostname
=
"127.0.0.
1
"
;
var
hostname
=
"127.0.0.
255
"
;
var
port
=
3001
;
var
headers
=
{
"Content-Type"
:
"application/json"
...
...
@@ -17,7 +17,6 @@ function request(path, cb) {
};
var
callback
=
function
(
response
)
{
console
.
log
(
'bla'
);
var
str
=
''
;
response
.
on
(
'data'
,
function
(
chunk
)
{
str
+=
chunk
;
...
...
@@ -31,11 +30,17 @@ function request(path, cb) {
req
.
on
(
"error"
,
function
(
err
)
{
cb
(
err
);
});
req
.
setTimeout
(
500
,
function
()
{
req
.
abort
();
});
req
.
end
();
}
request
(
path
,
function
(
err
,
res
)
{
console
.
log
(
err
);
console
.
log
(
res
);
});
function
getBundesland
(
plz
,
cb
)
{
...
...
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