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: docs/API/OutgoingMessageClass.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ title: OutgoingMessage
6
6
7
7
The `4D.OutgoingMessage` class allows you to build messages to be returned by your application functions in response to [REST requests](../REST/REST_requests.md). If the response is of type `4D.OutgoingMessage`, the REST server does not return an object but the object instance of the `OutgoingMessage` class.
8
8
9
-
Typically, this class can be used in custom [HTTP request handler functions](../WebServer/http-request-handler.md#function-configuration) or in functions declared with the [`onHttpGet`](../ORDA/ordaClasses.md#onhttpget-keyword) keyword and designed to handle HTTP GET requests. Such requests are used, for example, to implement features such as download file, generate and download picture as well as receiving any content-type via a browser.
9
+
Typically, this class can be used in custom [HTTP request handler functions](../WebServer/http-request-handler.md#function-configuration) or in functions declared with the [`onHTTPGet`](../ORDA/ordaClasses.md#onhttpget-keyword) keyword and designed to handle HTTP GET requests. Such requests are used, for example, to implement features such as download file, generate and download picture as well as receiving any content-type via a browser.
10
10
11
11
An instance of this class is built on 4D Server and can be sent to the browser by the [4D REST Server](../REST/gettingStarted.md) only. This class allows to use other technologies than HTTP (e.g. mobile).
Copy file name to clipboardExpand all lines: docs/Concepts/error-handling.md
+60-1Lines changed: 60 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ It is highly recommended to install a global error-handling method on 4D Server,
26
26
27
27
Many 4D class functions, such as `entity.save()` or `transporter.send()`, return a *status* object. This object is used to store "predictable" errors in the runtime context, e.g. invalid password, locked entity, etc., that do not stop program execution. This category of errors can be handled by regular code.
28
28
29
-
Other "unpredictable" errors include disk write error, network failure, or in general any unexpected interruption. This category of errors generates exceptions and needs to be handled through an error-handling method or a `Try()` keyword.
29
+
Other "unpredictable" errors include disk write error, network failure, or in general any unexpected interruption. This category of errors generates exceptions defined by [a *code*, a *message* and a *signature*](#error-codes)and needs to be handled through an error-handling method or a `Try()` keyword.
Exceptions that interrupt code execution are returned by 4D but can have different origins such as the OS, a device, the 4D kernel, a [`throw`](../commands-legacy/throw.md) in your code, etc. A returned error is therefore defined by three elements:
303
+
304
+
- a **component signature**, which is the origin of the error
305
+
- a **message**, wich explains why the error occurred
306
+
- a **code**, which is an arbitrary number returned by the component
307
+
308
+
These information are returned for every error (when available) by the [4D error dialog box](../Debugging/basics.md) and the [`Last errors`](../commands-legacy/last-errors.md) command. Keep in mind that, if you intercept and handle errors using a [error-handling method](#installing-an-error-handling-method), you need to process all information since a simple error code could not be correctly interpreted.
309
+
310
+
#### 4D component signatures
311
+
312
+
|Component Signature|Component|
313
+
|--|---|
314
+
|4DCM|4D Compiler runtime|
315
+
|4DRT|4D runtime|
316
+
|bkrs|4D backup & restore manager|
317
+
|brdg|SQL 4D bridge|
318
+
|cecm|4D code Editor|
319
+
|CZip|zip 4D apis|
320
+
|dbmg|4D database manager|
321
+
|FCGI|fast cgi 4D bridge|
322
+
|FiFo|4D file objects|
323
+
|HTCL|http client 4D apis|
324
+
|HTTP|4D http server|
325
+
|IMAP|IMAP 4D apis|
326
+
|JFEM|Form Macro apis|
327
+
|LD4D|LDAP 4D apis|
328
+
|lscm|4D language syntax manager|
329
+
|MIME|MIME 4D apis|
330
+
|mobi|4D Mobile|
331
+
|pdf1|4D pdf apis|
332
+
|PHP_|php 4D bridge|
333
+
|POP3|POP3 4D apis|
334
+
|SMTP|SMTP 4D apis|
335
+
|SQLS|4D SQL server|
336
+
|srvr|4D network layer apis|
337
+
|svg1|SVG 4D apis|
338
+
|ugmg|4D users and groups manager|
339
+
|UP4D|4D updater|
340
+
|VSS |4D VSS support (Windows Volume Snapshot Service) |
Copy file name to clipboardExpand all lines: docs/Notes/updates.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,10 @@ Read [**What’s new in 4D 20 R10**](https://blog.4d.com/en-whats-new-in-4d-20-R
12
12
13
13
- New `connectionTimeout` option in the [`options`](../API/TCPConnectionClass.md#options-parameter) parameter of the [`4D.TCPConnection.new()`](../API/TCPConnectionClass.md#4dtcpconnectionnew) function.
14
14
15
+
- 4D Language:
16
+
- For consistency, [`Create entity selection`](../commands/create-entity-selection.md) and [`USE ENTITY SELECTION`](../commands/use-entity-selection.md) commands have been moved from the ["4D Environment"](../commands/theme/4D_Environment.md) to the ["Selection"](../commands/theme/Selection.md) themes.
17
+
18
+
15
19
## 4D 20 R9
16
20
17
21
Read [**What’s new in 4D 20 R9**](https://blog.4d.com/en-whats-new-in-4d-20-R9/), the blog post that lists all new features and enhancements in 4D 20 R9.
@@ -74,7 +78,7 @@ Read [**What’s new in 4D 20 R7**](https://blog.4d.com/en-whats-new-in-4d-20-R7
74
78
- You can now [add and remove components using the Component manager interface](../Project/components.md#monitoring-project-dependencies).
75
79
- New [**direct typing mode**](../Project/compiler.md#enabling-direct-typing) in which you declare all variables and parameters in your code using `var` and `#DECLARE`/`Function` keywords (only mode supported in new projects). [Syntax checking feature](../Project/compiler.md#check-syntax) has been enhanced accordingly.
76
80
- Support of [Session singletons](../Concepts/classes.md#singleton-classes) and new [`.isSessionSingleton`](../API/ClassClass.md#issessionsingleton) Class property.
77
-
- New [`onHttpGet` function keyword](../ORDA/ordaClasses.md#onhttpget-keyword) to define singleton or ORDA functions that can be called through [HTTP REST GET requests](../REST/ClassFunctions.md#function-calls).
81
+
- New [`onHTTPGet` function keyword](../ORDA/ordaClasses.md#onhttpget-keyword) to define singleton or ORDA functions that can be called through [HTTP REST GET requests](../REST/ClassFunctions.md#function-calls).
78
82
- New [`4D.OutgoingMessage`](../API/OutgoingMessageClass.md) class for the REST server to return any web contents.
79
83
- Qodly Studio: You can now [attach the Qodly debugger to 4D Server](../WebServer/qodly-studio.md#using-qodly-debugger-on-4d-server).
80
84
- New Build Application keys for remote 4D applications to validate the server certificate authority [signatures](https://doc.4d.com/4Dv20R7/4D/20-R7/CertificateAuthoritiesCertificates.300-7425900.en.html) and/or [domain](https://doc.4d.com/4Dv20R7/4D/20-R7/CertificateDomainName.300-7425906.en.html).
Copy file name to clipboardExpand all lines: docs/ORDA/ordaClasses.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -859,20 +859,20 @@ $status:=$remoteDS.Schools.registerNewStudent($student) // OK
859
859
$id:=$remoteDS.Schools.computeIDNumber() // Error "Unknown member method"
860
860
```
861
861
862
-
## onHttpGet keyword
862
+
## onHTTPGet keyword
863
863
864
-
Use the `onHttpGet` keyword to declare functions that can be called through HTTP requests using the `GET` verb. Such functions can return any web contents, for example using the [`4D.OutgoingMessage`](../API/OutgoingMessageClass.md) class.
864
+
Use the `onHTTPGet` keyword to declare functions that can be called through HTTP requests using the `GET` verb. Such functions can return any web contents, for example using the [`4D.OutgoingMessage`](../API/OutgoingMessageClass.md) class.
865
865
866
-
The `onHttpGet` keyword is available with:
866
+
The `onHTTPGet` keyword is available with:
867
867
868
868
- ORDA Data model class functions
869
869
-[Singletons class functions](../Concepts/classes.md#singleton-classes)
870
870
871
871
The formal syntax is:
872
872
873
873
```4d
874
-
// declare an onHttpGet function
875
-
exposed onHttpGet Function <functionName>(params) : result
874
+
// declare an onHTTPGet function
875
+
exposed onHTTPGet Function <functionName>(params) : result
876
876
```
877
877
878
878
:::info
@@ -889,7 +889,7 @@ As this type of call is an easy offered action, the developer must ensure no sen
889
889
890
890
### params
891
891
892
-
A function with `onHttpGet` keyword accepts [parameters](../Concepts/parameters.md).
892
+
A function with `onHTTPGet` keyword accepts [parameters](../Concepts/parameters.md).
893
893
894
894
In the HTTP GET request, parameters must be passed directly in the URL and declared using the `$params` keyword (they must be enclosed in a collection).
895
895
@@ -903,7 +903,7 @@ See the [Parameters](../REST/classFunctions#parameters) section in the REST serv
903
903
904
904
### result
905
905
906
-
A function with `onHttpGet` keyword can return any value of a supported type (same as for REST [parameters](../REST/classFunctions#parameters)).
906
+
A function with `onHTTPGet` keyword can return any value of a supported type (same as for REST [parameters](../REST/classFunctions#parameters)).
Copy file name to clipboardExpand all lines: docs/REST/$singleton.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ with data in the body of the POST request: `["myparam"]`
47
47
48
48
:::note
49
49
50
-
The `SingletonClassFunction()` function must have been declared with the `onHttpGet` keyword to be callable with `GET` (see [Function configuration](ClassFunctions#function-configuration)).
50
+
The `SingletonClassFunction()` function must have been declared with the `onHTTPGet` keyword to be callable with `GET` (see [Function configuration](ClassFunctions#function-configuration)).
Copy file name to clipboardExpand all lines: docs/REST/ClassFunctions.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,7 +55,7 @@ with data in the body of the POST request: `["Aguada"]`
55
55
56
56
:::note
57
57
58
-
The `getCity()` function must have been declared with the `onHttpGet` keyword (see [Function configuration](#function-configuration) below).
58
+
The `getCity()` function must have been declared with the `onHTTPGet` keyword (see [Function configuration](#function-configuration) below).
59
59
60
60
:::
61
61
@@ -80,13 +80,13 @@ exposed Function getSomeInfo() : 4D.OutgoingMessage
80
80
See [Exposed vs non-exposed functions](../ORDA/ordaClasses.md#exposed-vs-non-exposed-functions) section.
81
81
82
82
83
-
### `onHttpGet`
83
+
### `onHTTPGet`
84
84
85
-
Functions allowed to be called from HTTP `GET` requests must also be specifically declared with the [`onHttpGet` keyword](../ORDA/ordaClasses.md#onhttpget-keyword). For example:
85
+
Functions allowed to be called from HTTP `GET` requests must also be specifically declared with the [`onHTTPGet` keyword](../ORDA/ordaClasses.md#onhttpget-keyword). For example:
86
86
87
87
```4d
88
88
//allowing GET requests
89
-
exposed onHttpGet Function getSomeInfo() : 4D.OutgoingMessage
89
+
exposed onHTTPGet Function getSomeInfo() : 4D.OutgoingMessage
Copy file name to clipboardExpand all lines: docs/WebServer/http-request-handler.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -252,7 +252,7 @@ Request handler functions are not necessarily shared, unless some request handle
252
252
253
253
:::note
254
254
255
-
It is **not recommended** to expose request handler functions to external REST calls using [`exposed`](../ORDA/ordaClasses.md#exposed-vs-non-exposed-functions) or [`onHttpGet`](../ORDA/ordaClasses.md#onhttpget-keyword) keywords.
255
+
It is **not recommended** to expose request handler functions to external REST calls using [`exposed`](../ORDA/ordaClasses.md#exposed-vs-non-exposed-functions) or [`onHTTPGet`](../ORDA/ordaClasses.md#onhttpget-keyword) keywords.
0 commit comments