Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

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

by derby (Abbot)
on Jan 05, 2007 at 13:32 UTC ( #593109=note: print w/replies, xml ) Need Help??


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

++ and thanks for the clue about CGI::Application::Plugin::JSON (I hadn't seen that). I've been using JSON but instead of header type text/plain, I've been using application/json (which is outlined in the rfc).

-derby

Replies are listed 'Best First'.
Re^3: Reading Raw data in CGI::Application
by msubbareddy (Initiate) on Aug 22, 2012 at 00:44 UTC
    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'); } }

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://593109]
help
Chatterbox?
[Corion]: I think I saw virtualsue more recently in person than online :-D
[virtualsue]: It's true that there was a bigger gap between the 2 yr old post and the one before it
[ambrus]: yes, I probably just didn't see you two years ago, because I'm not in perlmonks much
[virtualsue]: Nor am I :-)
[talexb]: virtualsue Heh .. long time no see! :)
[virtualsue]: I have a quiet Perl themed slack workspace
[virtualsue]: The person who talks to me on it the most *hates* Perl but she hates everything
[virtualsue]: If anyone is interested, ping me an email address for an invitation.
[virtualsue]: I welcome any talktaive people who do not mind using a propietary walled-garden service for free

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (11)
As of 2017-09-26 13:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (295 votes). Check out past polls.

    Notices?