Author image MATSUNO★…Tokuhiro
and 1 contributors

NAME

Net::Groonga::HTTP::Response - Response object for Net::Groonga::HTTP

DESCRIPTION

This class is a response class for Net::Groonga::HTTP.

BASIC METHODS

$res->function() :Str

The name of executed function.

$res->args() : HashRef

The arguments for executed function.

$res->http_response() :Object

Executed HTTP response object from Furl.

METHODS FOR ANALYZING CONTENT-BODY

Following methods return method dies if the response is not 200 OK.

$res->data() :Object

JSON decoded content body.

$res->return_code() :Int

Shorthand for $res->data->[0]->[0].

Groonga's return code. It's not HTTP status code.

$res->starttime() :Int

Shorthand for $res->data->[0]->[2].

$res->elapsed_time() :Int

Shorthand for $res->data->[0]->[2].

Elapsed time.

$res->result() :Int

Shorthand for $res->data->[1].

$res->pager() :Net::Groonga::Pager

Create pager object if it's available.

It's only useful if the function is select.

The object instance of Net::Groonga::Pager.

@rows = $res->rows()

Create list of hashrefs from JSON content.

It's only useful if the function si select.