java - Client HTTP Post to external sites -


Is there any web language that makes the client self-made HTTP post on external sites.

I know that Javascript does with XMLHttpRequest, but it does not allow cross-domain posting, as long as the recipient does not allow a domain sending domain.

I want to post data to an external site (which I can not control) and request that the client's browser already has (cookies, etc.).

Is this possible? I tried curl but it seems that a server is not HTTP post, a client HTTP post.


Edit:

One more information about what I'm trying to do:

I use Jason's user session I'm trying to post to the website (I told the cookies, but I believe they are PHP sessions, which I think I still accept as cookies).

Does not check website referrals (bad security # 1). I can execute javascript and HTML on a webpage using my personal homepage (bad security # 2) even if the JSON code will still work There is a content-type form (poor security # 3) There is absolutely no security check, just check the PHP session.

The idea of ​​the form is great and it works probably again that its JSON therefore postdate foo = {"test": "123", "test2": "456" } ; Plus form wants to change Jasmine to form encoding, so send it:

foo =% 7B% 22 test % 22% 3A +% 22 123 % 22% 2C +% 22 test2 % 22% 3a +% 22 456 % 22% 7D

when I need it;

{"test": "123", "test2": "456"} "

With all the known, is there a better chance to send JSON or not? < I do not think so: You will not get user's authenticated cookies on the third party site from server side (because Single Origin Policy) and you can not request Ajax on third party site.

The best you can possibly do is

(probably & Lt; iframe & gt; ), make it the third track Point to the site, populate it with data, and the user submits it (or submit it automatically). You will be able to capture results of the results of the No program (again single Due to the Origin policy), but it may - you can still show the user's request results.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -