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/04.guides/13.Various/24.rest-services/page.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,7 +45,7 @@ In Lucee you have two main options to add a REST service to your Application:
45
45
***Physical:***C:\path-to-location-with-your-rest-components\\* and click on **save**
46
46
47
47
***Step 3:** OPTIONAL: To make sure the REST services are correctly set up, activate the check box for **List services**. When enabled, you'll see a list of all the REST service mappings by navigating to `http://localhost:8888/rest/` (this will list all REST mappings created for the localhost web-context).
48
-
<br>
48
+
49
49
<br>
50
50
51
51
#### Option 2: Setting up REST service by defining a REST mapping in Application.cfc ####
@@ -88,7 +88,7 @@ If you have enabled **List services** in the REST settings of your Lucee Server
88
88
* Verify if you're using the correct Lucee Administrator's password in the password-attribute of the [[function-restinitapplication]] function.
89
89
90
90
* Plain REST requests won't invoke the `Application.cfc`, thus no REST mapping will be added with the [[function-restinitapplication]] function with pure REST requests. Try running a `.cfm` template to invoke the `Application.cfc` then. If your application doesn't have a .cfm template, create an empty index.cfm and run it. This will ensure that the [[function-restinitapplication]] function in `Application.cfc` gets executed. It's also possible to create a special template (e.g. `initRest.cfm`) containing the [[function-restinitapplication]] function for the simple purpose of executing that function as an update of the REST mapping.
91
-
<br>
91
+
92
92
<br>
93
93
94
94
### 4. Creating the REST example application ###
@@ -168,7 +168,7 @@ To intercept requests for `rest/*` paths and direct them to Tomcat/Lucee, follow
168
168
**Step 7:* Click on **Request Restrictions** and uncheck *invoke handler only if request is mapped to:*
169
169
170
170
**Step 8:* Apply the changes by clicking **Ok**
171
-
<br>
171
+
172
172
<br>
173
173
174
174
#### For Apache2 on Ubuntu/Linux ####
@@ -228,7 +228,7 @@ Find below a quick reference overview of specific component attributes and funct
228
228
***rest (boolean):** enables/disables the component as an accessible rest component. Default value is `true`. Set it to false if you wish to disable a component from serving REST services.
229
229
***restpath (string):** defines the path that invokes the component. Use this to define your own REST path in case you don't want to use the components name.
230
230
***httpMethod (string):** defines the http method to access the component. All values that are supported and allowed by the server can be used. Common values are `GET | POST | PUT | UPDATE | DELETE | HEAD | OPTIONS`
231
-
<br>
231
+
232
232
<br>
233
233
234
234
#### 7.2 CFfunction attributes for REST ####
@@ -238,14 +238,14 @@ Find below a quick reference overview of specific component attributes and funct
238
238
***httpMethod (string)** defines the http method to access the function. All values that are supported and allowed by the server can be used. Common values are `GET | POST | PUT | UPDATE | DELETE | HEAD | OPTIONS`
239
239
***produces (string):** defines the content-type of the server response, e.g. `text/plain | text/html | application/json | application/xml` or other valid mime-types. Default is `application/json`.
240
240
***consumes (string):** defines the content-type of the expected request body from the client.
241
-
<br>
241
+
242
242
<br>
243
243
244
244
#### 7.3 CFargument ####
245
245
246
246
***restArgName (string):** Defines the variable name of the request data.
247
247
***restArgSource (string):** Defines the data scope for the variable name to be extracted. Possible values are `PATH | QUERY | FORM | MATRI | HEADER | COOKIE`
248
-
<br>
248
+
249
249
<br>
250
250
251
251
### 8. Using file extensions to format return data ###
0 commit comments