FORM POST TO EXTERNAL URL -NEED HTTP BUT ALWAYS IN HTTPS- - forms

In a AURA Lightining component,i need to implement a POST with a FORM, and the target Endpoint is in HTTP and not in HTTPS.
Here the code:
on submitForm:
cmp.find("formFirma").getElement().submit();
The problem is that when i click on button,the browser open the new tab always in https and doesn't find the external resource.
Even if POST should be always in HTTPS,is there a way to this HTTP?
if a do a "GET" with :
'''
var urlEvent = $A.get("e.force:navigateToURL");
urlEvent.setParams({
"url": "http://endpoint"
});
urlEvent.fire();
'''
it works in HTTP.
Thanks

<div onclick="{!c.submitForm}">
<form name="formFirma1" target="_blank" forceSSL="false" aura:id="formFirma" action="http://endpoint" method="POST">
<input type="hidden" name="idVerbale" value="191" />
<input type="hidden" name="CUAA" value="12345AB" />
<input type="hidden" name="TipoUtente" value="Agronomo" />
<lightning:button label="Firma" />
</form></div>
Here is the markup

Related

Do browsers merge form action querystring params with fields?

Consider this form:
<form method="GET" action="/signup?foo=1">
<input type="hidden" name="bar" value="2"/>
<input type="submit"/>
</form>
Will browsers reliably request "/signup?foo=1&bar=2"?
No.
JS Fiddle suggests Chrome will discard foo=1, and request /signup?bar=2.

formspree.io "Make sure you open this page through a web server ..."

I'm trying to use formspree.io but for some reason is returning the following error:
Make sure you open this page through a web server, Formspree will not work in >pages browsed as HTML files. Also make sure that you're posting to >https://formspree.io/test#yopmail.com.
For geeks: could not find the "Referrer" header.
My code is the following:
<form action="https://formspree.io/test1#yopmail.com" method="POST" target="_blank">
<input type="text" id="name" name="name" placeholder="*First Name">
<input type="text" id="lastname" name="lastname" placeholder="*Last Name">
<textarea id="subject" name="subject" placeholder="*Your Message" style="height:200px"></textarea>
<input type="submit" value="Submit">
</form>
Please notice that I have the s in the "https://fo..." and I also have in my head tag the following:
<meta name="referrer" content="origin">
Thanks for any help.

posting data using html in iphone

In website the form data is posted using the code below using HTML post request:
<div id="requestinfo">
<form method="post" action="http://abc/form-post.php" id="request_form">
<input type="hidden" name="field1" value="value1" />
<input type="hidden" name="field2" value="value2" />
</form>
</div>
How can I do the same in iPhone? We do not have to use web services.
I'd recommend using AFNetworking as a solution for working with HTTP verbs and data.
The AFHTTPClient allows you to specify the verb (POST in this case) as well as the parameters to pass.
See: AFNetworking Post Request

JSF form with URL action?

Is there any way to call a URL action within a <h:commandButton>, or for that matter a <h:form>? I'm trying to bypass my email's login page from my own website, so I'm using JSF beans to hold my login info in <h:inputSecret> tags so that I can simply click "Go to Email" and because I'm logged in to my own website, I could go straight to my inbox w/o logging in again
Just use plain HTML <form> instead of JSF <h:form>.
<form action="http://example.com/mail" method="post">
<input type="text" name="username" value="#{bean.username}" />
<input type="password" name="password" value="#{bean.password}" />
<input type="submit" value="Go to Email" />
</form>

Why is JBoss Post Form sending parameters in URL?

Our JBoss form is posting the parameters in the URL instead of in the request despite being a POST form. I have confirmed that the form is post in the actual page using Firebug. Note that this is within a portlet.
We are submitting the form using javascript like:
function submitForm(action, time)
{
document.getElementById("pageActionInputID").value = time;
document.getElementById("timeSpanFormInputID").value = action;
document.getElementById("formID").submit();
}
<form action="<portlet:actionURL></portlet:actionURL>" method="POST" id="formID">
<input type="hidden" name="pageAction" id="pageActionInputID" />
<input type="hidden" name="timeSpan" id="timeSpanFormInputID" />
</form>
where 'portlet' is from
<%# taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
Any ideas why we are getting the inputs in the URL?
Here is what the resulting markup looks like:
<form id="formID" method="post" action="/portal/auth/portal/myTab?action=1">
<input id="pageActionInputID" type="hidden" name="pageAction"/>
<input id="timeSpanFormInputID" type="hidden" name="timeSpan"/>
</form>
Though it would be great if someone could confirm it. I think the JBoss Portlet throws out post/get and uses action URLs instead.
A descriptive article about render and action URLs