https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21334
Tomás Cohen Arazi <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #78564|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <[email protected]> --- Created attachment 78565 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=78565&action=edit Bug 21334: Add bibliographic content type definitions This patch adds the following content type definitions, to be used by endpoint authors implementing MARC-related endpoints: -------------------------------------- | Content-type | Alias | |--------------------------|---------| | application/marcxml+xml | marcxml | | application/marc-in-json | mij | | application/marc | marc | -------------------------------------- Code using this aliases will use them like this: - Suppose you want to output data in MARCXML format: my $record = cool_method_that_returns_MARC_RECORD(); return $c->render( status => 200, format => 'marcxml', text => $record->as_xml_record ); Note: 'text' by defaults encodes output as UTF-8. If the encoding is not UTF-8 you should encode the data on your own. To test: - Apply this patches - Run: $ kshell k$ prove t/db_dependent/Koha/REST/V1.t => SUCCESS: Test pass! - Sign off :-D -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
