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
|
|
@ -134,10 +134,10 @@ sub handler {
|
|||
assets => \@assets
|
||||
};
|
||||
if ($as eq "xml") {
|
||||
$session->http->setMimeType('text/xml');
|
||||
$session->response->content_type('text/xml');
|
||||
return XML::Simple::XMLout($document, NoAttr => 1);
|
||||
}
|
||||
$session->http->setMimeType('application/json');
|
||||
$session->response->content_type('application/json');
|
||||
return JSON->new->encode($document);
|
||||
}
|
||||
return undef;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue