Fetch data in report from REST server with POST request in Vue.js
Fetch data in report from REST server with POST request in Vue.js
Hello!
How can I load data from my REST server with HTTP POST request in my report? I need to set variables from user input as JSON payload in POST request, send it to my REST server and set the response in the report results.
I use Report.JS integrated with Vue.js.
How can I load data from my REST server with HTTP POST request in my report? I need to set variables from user input as JSON payload in POST request, send it to my REST server and set the response in the report results.
I use Report.JS integrated with Vue.js.
-
- Posts: 7354
- Joined: Tue Mar 20, 2018 5:34 am
Re: Fetch data in report from REST server with POST request in Vue.js
Hello,
You can use the Request from use variables in your JSON URL in the data source.
Thank you.
You can use the Request from use variables in your JSON URL in the data source.
Thank you.
Re: Fetch data in report from REST server with POST request in Vue.js
Thank you for your reply.
I need to payload my variables in the request body (NOT in the URL). Is it possible to do it from report designer or from code?
I need to payload my variables in the request body (NOT in the URL). Is it possible to do it from report designer or from code?
-
- Posts: 7354
- Joined: Tue Mar 20, 2018 5:34 am
Re: Fetch data in report from REST server with POST request in Vue.js
Hello,
Try to use the Headers option in the JSON connection.
Thank you.
Try to use the Headers option in the JSON connection.
Thank you.
- Attachments
-
- Screenshot 2024-07-28 183533.png (160.25 KiB) Viewed 5739 times
Re: Fetch data in report from REST server with POST request in Vue.js
I use the REST server that requires POST request with request body so unfortunately I cannot use your solutions because it still sends GET request.
-
- Posts: 7354
- Joined: Tue Mar 20, 2018 5:34 am
Re: Fetch data in report from REST server with POST request in Vue.js
Hello,
In this case, you can implement your own data adapter as you need:
https://github.com/stimulsoft/DataAdapters.JS
Thank you.
In this case, you can implement your own data adapter as you need:
https://github.com/stimulsoft/DataAdapters.JS
Thank you.
Re: Fetch data in report from REST server with POST request in Vue.js
Thank you for your reply.
Are you planning to add the ability to send POST requests in the near future?
Are you planning to add the ability to send POST requests in the near future?
-
- Posts: 7354
- Joined: Tue Mar 20, 2018 5:34 am
Re: Fetch data in report from REST server with POST request in Vue.js
Hello,
At the current moment, we do not have such plans.
Thank you.
At the current moment, we do not have such plans.
Thank you.