Cancel endpoint response

I’m having a problem with the HTML block, can anyone help me?
I will better explain the problem
the system I’m developing is for production control, to insert a new production order I created a form in the HTML block to improve my customer’s experience,
everything is working fine, the information is going to the device correctly.

the problem is in the response from the endpoint, I would like not to have a response from the endpoint, as it appears that the response is in place of the form, and it is necessary to reload the page every time I press the submit button
is there a solution to get no response from the endpoint on the screen?

I tried to pull out the endpoint:Reply block but it sends a response error message to the screen

There isn’t really a way to not receive a response at all, as it is the nature of an HTTP request to remain open until it receives a response from the server, even if that response is a blank body and a 200 OK status code.

I haven’t seen the code in your Custom HTML Block but I am guessing that it is a standard <form> element with a post method and an action pointing to the endpoint receiving the input. I can think of two options here:

  1. Edit the reply to the endpoint to include a custom response of your choosing, even if it is the same form again (if you are trying to leave the form in place). You would probably also want to include some sort of feedback to the user that the form submitted successfully.
  2. Change the form to submit asynchronously using JavaScript’s Fetch API, which will leave your form UI in place while firing off the request behind the scenes. Then, based on the response you get back, you could optionally add some feedback to the UI about the success or failure of the submission while still leaving the rest of the form in place.
1 Like

hi @Dylan_Schuster
this solution is worked
thank you so much :grinning: :grinning: