File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes how to make https post in JavaScript Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply Bookmark "how to make https post in JavaScript" Watch "how to make https post in JavaScript" New topic
Author

how to make https post in JavaScript

saipraneeth nallapareddy
Ranch Hand

Joined: Dec 02, 2009
Posts: 159
hello ranchers
I am trying to connect to an url which is on https, i am fine with the http post in java script using XmlHttpRequest, but i am unable to make a https post using the same.
Actually the java script is a part of the Phonegap which is no way different from how the java script being handled in a browser.
One more question i have is, how to provide the security certificate in order to make the https communication.
Can any one please provide me with the piece of code to make the https post.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
You can not make XMLHttpRequest calls from http to https and https to http because of the same origin policy.

Eric
saipraneeth nallapareddy
Ranch Hand

Joined: Dec 02, 2009
Posts: 159
Thanks for the reply Eric
You can not make XMLHttpRequest calls from http to https and https to http because of the same origin policy.

I am not making the call from http to https or vice versa, my requests and responses are to https only.
saipraneeth nallapareddy
Ranch Hand

Joined: Dec 02, 2009
Posts: 159
I have noticed like my post has been edited, i am sorry if some thing what i mean to say didn't make any sense but the content of the post which has been modified is
Bear Bibeault edited it as wrote: but i am unable to make a http post using the same.

but i am facing the problem in making https post, i am not sure whether XmlHttpRequest is to be used for a https post, please correct me if i am wrong, but what i need is to make a https post, so i restored the content of the post i made here as
but i am unable to make a https post using the same.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15003
Is there error messages? Using a tool such as Fiddler do you see the call go out?

Eric
 
IntelliJ Java IDE
 
subject: how to make https post in JavaScript
 
Threads others viewed
Trouble generating web service client
to run a unix script
Using https for certain JSP
How to encrypt and Decrypt form parameters?
secure to non secure
IntelliJ Java IDE

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture