Servoy 2021 doesn't support multipart/form-data text request

Forum to discuss the Web client version of Servoy.

Servoy 2021 doesn't support multipart/form-data text request

Postby ATrinkunas » Wed Jun 07, 2023 7:09 pm

I am trying to make Servoy 2021.3.2 LTS RESTful Web Service handle multipart/form-data (text) requests.
I successfully can do it with "Servoy 2022.03.4 LTS", but Servoy 2021.3.2 LTS doesn't work the same way. See attached video and postmen request file.

Is there way to make Servoy 2021.3.2 LTS RESTful Web Service work the same way. Maybe copy some files from Servoy 2022.03.4 LTS is going to help?

Thanks, Anton
You do not have the required permissions to view the files attached to this post.
ATrinkunas
 
Posts: 5
Joined: Mon Apr 06, 2020 7:52 pm

Re: Servoy 2021 doesn't support multipart/form-data text req

Postby ptalbot » Wed Jun 07, 2023 11:42 pm

Pretty easy with the Velocity plugin which is so much more powerful than the WS_REST plugin...

See the attached solution and config.json file in the zip file:
velocity.zip

You need to add the latest (v3.6.3) Velocity plugin in your /application_server/plugins - you can download the distribution here: https://www.servoyforge.net/projects/velocity-report/files - you just need the content of the "plugins" folder from the zip distribution.

Then create a "reports" folder (name doesn't matter) somewhere on the file system with a "www" folder (name matter) and place the "config.json" file in it.
In servoy-admin/plugin-settings set the value of the "velocityreport.reportfolder" property to the path where you've put the reports folder.

Then instead of using "rest_ws" in your url, use "velocity":
Code: Select all
http://localhost:8183/servoy-service/rest_ws/avanti_api/api_web_service/...
becomes
http://localhost:8183/servoy-service/velocity/avanti_api/api_web_service/...
You do not have the required permissions to view the files attached to this post.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1659
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Servoy 2021 doesn't support multipart/form-data text req

Postby ATrinkunas » Tue Jun 13, 2023 7:19 pm

Thanks, it worked. Even it supports multipart/related content type.
ATrinkunas
 
Posts: 5
Joined: Mon Apr 06, 2020 7:52 pm


Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 3 guests