Skip to content

Commit

Permalink
clean up README example some more
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Feb 6, 2014
1 parent fc5d656 commit ea9b69c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -76,10 +76,10 @@ get '/time' => 'clock';

# Scrape information from remote sites
post '/title' => sub {
my $self = shift;
my $url = $self->param('url') || 'http://mojolicio.us';
$self->render(
json => {title => $self->ua->get($url)->res->dom->at('title')->text});
my $self = shift;
my $url = $self->param('url') || 'http://mojolicio.us';
my $title = $self->ua->get($url)->res->dom->at('title')->text;
$self->render(json => {url => $url, title => $title});
};

# WebSocket echo service
Expand Down

0 comments on commit ea9b69c

Please sign in to comment.