Would be excellent we could provide a method for extra response types that come out of the get_server module, such as vCard etc.

An implementation of this just looks like

function mymodule_services_encode_response($protocol, $result, $method) {
  switch ($protocol) {
    case 'vcard':
       header("Content-type: text/x-vcard");
       header("Content-Disposition: attachment; filename=vcard.vcf");      
       ...
       print $vcard;
       exit;
    break;
  }
}

See attached patch

CommentFileSizeAuthor
get_server-pluggable-types.patch2.17 KBdgtlmoon

Comments

dgtlmoon’s picture

Something odd in the patch which might bite your document RCS

-// $Id: get_server.module,v 1.5 2007/12/18 00:31:58 sime Exp $
+<?
+// $CVS$

but works great otherwise