Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Reading Raw data in CGI::Application

by msubbareddy (Initiate)
on Aug 22, 2012 at 00:44 UTC ( #988912=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Reading Raw data in CGI::Application
in thread Reading Raw data in CGI::Application

Quick solution <if anybody still needed on sending json for runmode>

sub send_json_data: Runmode { my $self = shift; $self->header_add(-type=>"application/json"); ... }
OR refer this inside of CGI::Application::Plugin::JSON import() >> _send_headers() should take care of it.. though, its not taking care of for above runmode to return json data.
sub _send_headers { my $self = shift; my $private = $self->param('__CAP_JSON') || {}; if( defined $private->{header} ) { $self->header_add( '-x-json' => $self->json_header_string ); } if( defined $private->{json_body} ) { $self->header_add('-type' => 'application/json'); } elsif ( defined $private->{json_callback} ) { $self->header_add('-type' => 'text/javascript'); } }


Comment on Re^3: Reading Raw data in CGI::Application
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://988912]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (14)
As of 2015-07-28 11:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (254 votes), past polls