Reading
http://search.cpan.org/~gaas/libwww-perl-6.03/lib/LWP/UserAgent.pm it
seems that $ua->get returns a response object,
while "HTTP::Message content must be bytes at
/usr/local/share/perl/5.10.0/HTTP/Request/Common.pm line 91". seems to
hint that
the $response passed to $api->edit isn't the contents.
(perhaps $response->is_success() is false?)
First, you probably want "$response->decoded_content()", and second,
you want to make sure that $response is a scalar rather than a
reference or undef.
--
Mark