Change getMimeType and setMimeType to response->content_type.
This commit is contained in:
parent
e5adc07a05
commit
fd8f03a186
52 changed files with 138 additions and 175 deletions
|
|
@ -149,7 +149,7 @@ sub www_searchAsJSON {
|
|||
my $keyword = WebGUI::Keyword->new($session);
|
||||
|
||||
my $keywords = $keyword->findKeywords({search => $search, limit => 20});
|
||||
$session->http->setMimeType('application/json');
|
||||
$session->response->content_type('application/json');
|
||||
|
||||
return JSON::to_json({keywords => $keywords});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ sub www_getThingFields {
|
|||
[$thingId]
|
||||
);
|
||||
|
||||
$session->http->setMimeType( 'application/json' );
|
||||
$session->response->content_type( 'application/json' );
|
||||
return JSON->new->encode( \%fields );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ sub www_check {
|
|||
my $session = shift;
|
||||
my $input = $session->form->param('input');
|
||||
|
||||
$session->http->setMimeType( 'application/json' );
|
||||
$session->response->content_type( 'application/json' );
|
||||
my $i18n = WebGUI::International->new($session, 'Form_Username');
|
||||
|
||||
my $error = '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue