source: trunk/Packages/synapse/docs/help/httpsend.html

Last change on this file was 2, checked in by chronos, 12 years ago
  • Přidáno: Základní kostra projektu.
  • Přidáno: Knihovna synapse.
File size: 7.4 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
2<html>
3<head>
4<meta name="GENERATOR" content="PasDoc 0.9.0">
5<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
6<title>httpsend</title>
7<link rel="StyleSheet" type="text/css" href="pasdoc.css">
8</head>
9<body bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#800080" alink="#FF0000">
10<h1 class="unit">Unit httpsend</h1>
11<table class="sections">
12<tr>
13<td><a class="section" href="#@Description">Description</a></td><td><a class="section" href="#@Uses">uses</a></td><td><a class="section" href="#@Classes">Classes, Interfaces, Objects and Records</a></td><td><a class="section" href="#@FuncsProcs">Functions and Procedures</a></td><td><a class="section" href="#@Types">Types</a></td><td><a class="section" href="#@Constants">Constants</a></td><td>Variables</td></tr></table>
14<a name="@Description"></a><h2 class="description">Description</h2>
15&nbsp;<a name="@Uses"></a><h2 class="uses">uses</h2>
16<ul class="useslist"><li>SysUtils</li><li>Classes</li><li><a href="blcksock.html">blcksock</a></li><li><a href="synautil.html">synautil</a></li><li><a href="synaip.html">synaip</a></li><li><a href="synacode.html">synacode</a></li><li>synsock</li></ul><h2 class="overview">Overview</h2>
17<a name="@Classes"></a><h3 class="cio">Classes, Interfaces, Objects and Records</h3>
18<table class="classestable">
19<tr class="listheader">
20<th class="itemname">Name</th>
21<th class="itemdesc">Description</th>
22</tr>
23<tr class="list">
24<td class="itemname">Class&nbsp;<a class="bold" href="httpsend.THTTPSend.html"><code>THTTPSend</code></a></td>
25<td class="itemdesc">&nbsp;</td>
26</tr>
27</table>
28<a name="@FuncsProcs"></a><h3 class="summary">Functions and Procedures</h3>
29<table class="summary">
30<tr class="list">
31<td class="itemcode"><code>function <b><a href="httpsend.html#HttpGetText">HttpGetText</a></b>(const URL: string; const Response: TStrings): Boolean;</code></td>
32</tr>
33<tr class="list2">
34<td class="itemcode"><code>function <b><a href="httpsend.html#HttpGetBinary">HttpGetBinary</a></b>(const URL: string; const Response: TStream): Boolean;</code></td>
35</tr>
36<tr class="list">
37<td class="itemcode"><code>function <b><a href="httpsend.html#HttpPostBinary">HttpPostBinary</a></b>(const URL: string; const Data: TStream): Boolean;</code></td>
38</tr>
39<tr class="list2">
40<td class="itemcode"><code>function <b><a href="httpsend.html#HttpPostURL">HttpPostURL</a></b>(const URL, URLData: string; const Data: TStream): Boolean;</code></td>
41</tr>
42<tr class="list">
43<td class="itemcode"><code>function <b><a href="httpsend.html#HttpPostFile">HttpPostFile</a></b>(const URL, FieldName, FileName: string; const Data: TStream; const ResultData: TStrings): Boolean;</code></td>
44</tr>
45</table>
46<a name="@Types"></a><h3 class="summary">Types</h3>
47<table class="summary">
48<tr class="list">
49<td class="itemcode"><code><b><a href="httpsend.html#TTransferEncoding">TTransferEncoding</a></b> = (...);</code></td>
50</tr>
51</table>
52<a name="@Constants"></a><h3 class="summary">Constants</h3>
53<table class="summary">
54<tr class="list">
55<td class="itemcode"><code><b><a href="httpsend.html#cHttpProtocol">cHttpProtocol</a></b> = '80';</code></td>
56</tr>
57</table>
58<h2 class="description">Description</h2>
59<h3 class="detail">Functions and Procedures</h3>
60<table class="detail">
61<tr class="list">
62<td class="itemcode"><a name="HttpGetText"></a><code>function <b>HttpGetText</b>(const URL: string; const Response: TStrings): Boolean;</code></td>
63</tr>
64</table>
65<p>
66A very usefull function, and example of use can be found in the THTTPSend object. It implements the GET method of the HTTP protocol. This function sends the GET method for URL document to an HTTP server. Returned document is in the &quot;Response&quot; stringlist (without any headers). Returns boolean TRUE if all went well.</p>
67<table class="detail">
68<tr class="list">
69<td class="itemcode"><a name="HttpGetBinary"></a><code>function <b>HttpGetBinary</b>(const URL: string; const Response: TStream): Boolean;</code></td>
70</tr>
71</table>
72<p>
73A very usefull function, and example of use can be found in the THTTPSend object. It implements the GET method of the HTTP protocol. This function sends the GET method for URL document to an HTTP server. Returned document is in the &quot;Response&quot; stream. Returns boolean TRUE if all went well.</p>
74<table class="detail">
75<tr class="list">
76<td class="itemcode"><a name="HttpPostBinary"></a><code>function <b>HttpPostBinary</b>(const URL: string; const Data: TStream): Boolean;</code></td>
77</tr>
78</table>
79<p>
80A very useful function, and example of use can be found in the THTTPSend object. It implements the POST method of the HTTP protocol. This function sends the SEND method for a URL document to an HTTP server. The document to be sent is located in &quot;Data&quot; stream. The returned document is in the &quot;Data&quot; stream. Returns boolean TRUE if all went well.</p>
81<table class="detail">
82<tr class="list">
83<td class="itemcode"><a name="HttpPostURL"></a><code>function <b>HttpPostURL</b>(const URL, URLData: string; const Data: TStream): Boolean;</code></td>
84</tr>
85</table>
86<p>
87A very useful function, and example of use can be found in the THTTPSend object. It implements the POST method of the HTTP protocol. This function is good for POSTing form data. It sends the POST method for a URL document to an HTTP server. You must prepare the form data in the same manner as you would the URL data, and pass this prepared data to &quot;URLdata&quot;. The following is a sample of how the data would appear: 'name=Lukas&amp;field1=some%20data'. The information in the field must be encoded by EncodeURLElement function. The returned document is in the &quot;Data&quot; stream. Returns boolean TRUE if all went well.</p>
88<table class="detail">
89<tr class="list">
90<td class="itemcode"><a name="HttpPostFile"></a><code>function <b>HttpPostFile</b>(const URL, FieldName, FileName: string; const Data: TStream; const ResultData: TStrings): Boolean;</code></td>
91</tr>
92</table>
93<p>
94A very useful function, and example of use can be found in the THTTPSend object. It implements the POST method of the HTTP protocol. This function sends the POST method for a URL document to an HTTP server. This function simulate posting of file by HTML form used method 'multipart/form-data'. Posting file is in DATA stream. Its name is Filename string. Fieldname is for name of formular field with file. (simulate HTML INPUT FILE) The returned document is in the ResultData Stringlist. Returns boolean TRUE if all went well.</p>
95<h3 class="detail">Types</h3>
96<table class="detail">
97<tr class="list">
98<td class="itemcode"><a name="TTransferEncoding"></a><code><b>TTransferEncoding</b> = (...);</code></td>
99</tr>
100</table>
101<p>
102These encoding types are used internally by the THTTPSend object to identify the transfer data types.</p>
103<ul>
104<li>
105TE_UNKNOWN: </li>
106<li>
107TE_IDENTITY: </li>
108<li>
109TE_CHUNKED: </li>
110</ul>
111<h3 class="detail">Constants</h3>
112<table class="detail">
113<tr class="list">
114<td class="itemcode"><a name="cHttpProtocol"></a><code><b>cHttpProtocol</b> = '80';</code></td>
115</tr>
116</table>
117&nbsp;<hr noshade size="1"><span class="appinfo"><em>Generated by <a target="_parent" href="http://pasdoc.sourceforge.net/">PasDoc 0.9.0</a> on 2012-04-23 21:38:50</em>
118</span>
119</body></html>
Note: See TracBrowser for help on using the repository browser.