Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi! I fixed some calls to "sys" for you! #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Usage

A working example:

var sys = require('sys');
var util = require('util');
var wwwdude = require('wwwdude');

var client = wwwdude.createClient({
Expand All @@ -47,18 +47,18 @@ A working example:

client.get('http://google.com/')
.addListener('error', function (err) {
sys.puts('Network Error: ' + sys.inspect(err));
util.puts('Network Error: ' + util.inspect(err));
})
.addListener('http-error', function (data, resp) {
sys.puts('HTTP Error for: ' + resp.host + ' code: ' + resp.statusCode);
util.puts('HTTP Error for: ' + resp.host + ' code: ' + resp.statusCode);
})
.addListener('redirect', function (data, resp) {
sys.puts('Redirecting to: ' + resp.headers['location']);
sys.puts('Headers: ' + sys.inspect(resp.headers));
util.puts('Redirecting to: ' + resp.headers['location']);
util.puts('Headers: ' + util.inspect(resp.headers));
})
.addListener('success', function (data, resp) {
sys.debug('Got data: ' + data);
sys.puts('Headers: ' + sys.inspect(resp.headers));
util.debug('Got data: ' + data);
util.puts('Headers: ' + util.inspect(resp.headers));
});

Transparent Content Parsing
Expand All @@ -71,8 +71,8 @@ wwwdude supports transparent parsing of retrieved content. Parsers for XML and J
});

client.get('http://some.url/content.json').on('success', function (data, response) {
sys.puts('data: ' + sys.inspect(data));
sys.puts('String content: ' + response.rawData);
util.puts('data: ' + util.inspect(data));
util.puts('String content: ' + response.rawData);
});


Expand Down
2 changes: 1 addition & 1 deletion example/example.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Sys = require('sys'),
var Sys = require('util'),
HttpClient = require('wwwdude');

// simple example
Expand Down