Lucee RESTful Issue

Description

Hi there,
i am trying to setup a restful server for an angular app that I am building using lucee as the backend.

I am having trouble with preflight options and simply cannot get a resolution on this.

I have created a post test
http://api.foodfocusfindit.co.za:8888/rest/ffapi/expenseAPI/contact
If i hit this post via postman it works fine, however as soon as lucee sees the request come in via the browser it sees it as an OPTIONS (preflight) and not as a post. I understand why this is doing it.

However my code that initiates this call is as follows
<cffunction name="contactus" restpath="contact" access="remote" returntype="any" httpmethod="POST" produces="application/json">

So looking for a post and not an options. This kicks the request out with a 404 error saying the method cannot be found, which is obvious as i have set this to POST and not OPTIONS.
I have configured all the required headers with CFHEADER as well as set them in my web.config file.

GET requests works perfectly, however i simply cannot get past the preflight option;

Any help

Environment

Windows

Activity

Show:

Pothys - MitrahSoft 2 June 2023 at 14:58
Edited

I checked this issue with lucee version 6.0.0.419-SNAPSHOT. When using "GET" http method in rest service, it worked fine both Lucee and ACF. But When using "Post" method with in rest service , it returns "no rest service for [/rest/restpath] found" in lucee and ACF returns "method not found".

will confirm about this.

Related mailing list : https://dev.lucee.org/t/lucee-no-rest-service-for-found-in-mapping/11914

Details

Assignee

Reporter

Priority

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 1 January 2022 at 19:35
Updated 2 June 2023 at 15:20

Flag notifications