UNPKG

node-zoom

Version:
28 lines (26 loc) 2.5 kB
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>2.�HTTP</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="YAZ User's Guide and Reference"><link rel="up" href="soap.html" title="Chapter�6.�SOAP and SRU"><link rel="prev" href="soap.html" title="Chapter�6.�SOAP and SRU"><link rel="next" href="soap.xml.html" title="3.�SOAP Packages"></head><body><link rel="stylesheet" type="text/css" href="common/style1.css"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">2.�HTTP</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="soap.html">Prev</a></td><th width="60%" align="center">Chapter�6.�SOAP and SRU</th><td width="20%" align="right"><a accesskey="n" href="soap.xml.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="soap.http"></a>2.�HTTP</h2></div></div></div><p> YAZ only offers HTTP as transport carrier for SOAP, but it is relatively easy to change that. </p><p> The following definition of <code class="literal">Z_GDU</code> (Generic Data Unit) allows for both HTTP and Z39.50 in one packet. </p><pre class="synopsis"> #include &lt;yaz/zgdu.h&gt; #define Z_GDU_Z3950 1 #define Z_GDU_HTTP_Request 2 #define Z_GDU_HTTP_Response 3 typedef struct { int which; union { Z_APDU *z3950; Z_HTTP_Request *HTTP_Request; Z_HTTP_Response *HTTP_Response; } u; } Z_GDU ; </pre><p> The corresponding Z_GDU encoder/decoder is <code class="function">z_GDU</code>. The <code class="literal">z3950</code> is any of the known BER encoded Z39.50 APDUs. <code class="literal">HTTP_Request</code> and <code class="literal">HTTP_Response</code> is the HTTP Request and Response respectively. </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="soap.html">Prev</a></td><td width="20%" align="center"><a accesskey="u" href="soap.html">Up</a></td><td width="40%" align="right"><a accesskey="n" href="soap.xml.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter�6.�SOAP and SRU�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�3.�SOAP Packages</td></tr></table></div></body></html>