Skip Menu |

This queue is for tickets about the DB-CouchDB-Schema CPAN distribution.

Report information
The Basics
Id: 64938
Status: new
Priority: 0/
Queue: DB-CouchDB-Schema

People
Owner: Nobody in particular
Requestors: sk [...] intertivity.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: application/json expected
When calling create_doc i always get an error from couchdb: application/json expected so, i reimplemented _call: sub _call { my $self = shift; my $method = shift; my $uri = shift; my $content = shift; my $req = HTTP::Request->new($method, $uri); if(defined $content) { $req->header( 'Content-Type' => 'application/json' ); $req->content(Encode::encode('utf8', $content)) } my $ua = LWP::UserAgent->new(); my $return = $ua->request($req); my $response = $return->decoded_content({ default_charset => 'utf8' }); my $decoded; eval { $decoded = $self->json()->decode($response); }; if ($@) { return {error => $return->code, reason => $response}; } return $decoded; }