#!/usr/bin/perl

use strict;
use warnings;
no warnings 'uninitialized';

use CGI;
use Data::Dumper;

use lib "/home/wolf/open_source/recordstore/lib";

use Data::RecordStore::REST;

#
# next_id
# stow
# fetch
# delete_record
#

# there is just going to be GET id, POST id with a payload
my $q = CGI->new;
my $vars = $q->Vars;
my $data = $q->param('POSTDATA');

my $content = Data::RecordStore::REST->handle( $vars->{action}, $vars->{id}, $data );
print "Content-Type: $content_type\nContent-Length: ".length($content)."\n\n$content";

