You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: introduction.html
+24-28Lines changed: 24 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -266,7 +266,7 @@
266
266
<h1>Introduction<aclass="headerlink" href="#introduction" title="Link to this heading">¶</a></h1>
267
267
<p><codeclass="docutils literal notranslate"><spanclass="pre">dylan-curl</span></code> is a wrapper around the popular libcurl library,
268
268
providing a way to interact with network resources from within Open
269
-
Dylan programs. This wrapper try to simplify the complexities of
269
+
Dylan programs. This wrapper tries to simplify the complexities of
270
270
libcurl, offering a Dylan-friendly API while maintaining the core
271
271
capabilities of the underlying C library.</p>
272
272
<p><strong>Key Features</strong></p>
@@ -281,17 +281,17 @@ <h1>Introduction<a class="headerlink" href="#introduction" title="Link to this h
281
281
reliable error management.</p>
282
282
</dd>
283
283
</dl>
284
-
<sectionid="howto-convert-a-libcurl-program">
285
-
<h2>Howto convert a libcurl program<aclass="headerlink" href="#howto-convert-a-libcurl-program" title="Link to this heading">¶</a></h2>
284
+
<sectionid="how-to-convert-a-libcurl-program">
285
+
<h2>How to convert a libcurl program<aclass="headerlink" href="#how-to-convert-a-libcurl-program" title="Link to this heading">¶</a></h2>
286
286
<p>When converting a libcurl-based C program to the Open Dylan wrapper, a
287
287
few conventions streamline the process. Below are the main conventions
288
288
and their corresponding Open Dylan equivalents.</p>
289
289
<sectionid="creating-a-curl-handle">
290
290
<h3>Creating a CURL Handle<aclass="headerlink" href="#creating-a-curl-handle" title="Link to this heading">¶</a></h3>
291
291
<p>In libcurl, you create a handle using <aclass="reference external" href="https://curl.se/libcurl/c/curl_easy_init.html">curl_easy_init</a>. In the Open Dylan
292
292
wrapper, you create an object of the <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre"><curl-easy></span></code> class.</p>
<divclass="code-block-caption"><spanclass="caption-text">Opendylan example</span><aclass="headerlink" href="#id4" title="Link to this code">¶</a></div>
<p>In libcurl, parameters are configured using <aclass="reference external" href="https://curl.se/libcurl/c/curl_easy_setopt.html">curl_easy_setopt</a>, where a constant
316
316
representing the option name is paired with its value. In the Open
317
317
Dylan wrapper, options are set directly using property syntax, such as
318
-
<cite>curl.curl-option-name := value</cite>. If an error occurs while setting a
318
+
<ahref="#id1"><spanclass="problematic" id="id2">``</span></a>curl.curl-option-name := value`. If an error occurs while setting a
319
319
parameter, a <codeclass="xref py py-class docutils literal notranslate"><spanclass="pre"><curl-option-error></span></code> exception is raised.</p>
<divclass="code-block-caption"><spanclass="caption-text">Example showing the error checking, usually hidden in examples.</span><aclass="headerlink" href="#id5" title="Link to this code">¶</a></div>
<divclass="code-block-caption"><spanclass="caption-text">Example showing the error checking, usually hidden in examples.</span><aclass="headerlink" href="#id9" title="Link to this code">¶</a></div>
<divclass="code-block-caption"><spanclass="caption-text">In Opendylan errors can be captured in a block somewhere.</span><aclass="headerlink" href="#id6" title="Link to this code">¶</a></div>
<divclass="code-block-caption"><spanclass="caption-text">In Dylan errors can be captured in a block somewhere.</span><aclass="headerlink" href="#id10" title="Link to this code">¶</a></div>
<divclass="code-block-caption"><spanclass="caption-text">C example getting the total time of previous transfer</span><aclass="headerlink" href="#id8" title="Link to this code">¶</a></div>
<divclass="code-block-caption"><spanclass="caption-text">C example getting the total time of previous transfer</span><aclass="headerlink" href="#id12" title="Link to this code">¶</a></div>
0 commit comments