• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

really basic http post question

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This question is not java specific. It is about http post which seems to be similiar across languages. I am not a web developer, however, I have been a DBA for over 10 years. I did do some java/servlet/jsp development in school, but that was 10 years ago. I am actually trying to get an http post macro to work on my android phone. I asked this on android forums and did not get a response. I think HTTP Post is general enough where if I am careful in how I word my question, I can ask it here. Please bare with me. I will try not to ramble. This is a VERY basic question.

I bought a macro/job scheduler tool for android called 'tasker'. I want to use it to log into my web email with a button click (and possibly other stuff. I want to figure out how http post works). you can do http post commands from tasker by filling out a screen. I am having trouble figuring out the parameters. I don't need coding syntax. Tasker does that for me. I need to populate a data field.

I want to do it this way in part because I want to figure out how http post works. There are probably other ways to get my email. I don't want to do this. I want to figure this out.


Website: http://webmail.verizon.net/signin/



so for data I think it is

IDToken1=myusername&IDToken2="mypassword"&

I need to pass the button name too right? What is that? and what are the key value pairs. I tried
btnSubmit=submit

and this doesn't work. I installed imacro and selenium to do some click recording to figure this out. but I can't get from the macro recorder code to what I pass to http post.


I think this is the snippet of code I need to pass the correct data.






 
Ranch Hand
Posts: 859
IBM DB2 Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure what you are trying to do... but ...

I would expect this to the SSL (hhtps)

and.

Sometimes you cannot POST outside of your own domain (cross site scripting etc.)

WP
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

William P O'Sullivan wrote:I would expect this to the SSL (hhtps)


The SSL protocol is https, not "hhtps".

Sometimes you cannot POST outside of your own domain (cross site scripting etc.)


You can always post outside the same domain. Whether the server will accept the post or not is another question.
 
Bobby Johanson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please ignore the typo on the http or https. I can figure that part out. I'll number my questions.

1. I don't understand what this means?

"Sometimes you cannot POST outside of your own domain (cross site scripting etc.)"

I thought http post can be used to tell code to do an action on a form (including some other sites form) and http get, is used to get information or data from a form. So it could be used to get data someone inputs on your form or can be read from another web page. Am I misunderstanding this?

2. This is what I am trying to do. I want to send my username and password programmatically and then press the login button programmatically. What kind of command would I use to do it? I understand this isn't an android forum. Suppose I was to do this in java?

3. Here is a code snippet for http post I found? Is this kind of thing only useful in javascript for my form? I can't use this kind of code to press a button on another page?






 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bobby Johanson wrote:
1. I don't understand what this means?

"Sometimes you cannot POST outside of your own domain (cross site scripting etc.)"


As I already pointed out, it doesn't mean anything. You can post wherever you like.

Just be aware that severs may be configured/coded to accept only posts from their own domain.
 
Bobby Johanson
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if i want to test to see if the http post works. is it possible to use the http post command to log into a remote web page? if so, what do i need to pass in the http post command?
i think it is

username="myusername"&password="mypassword"

do I also pass the button?

what approach is better to take if i want to automatically log into a website? do i need to use javascript and onclick? I think you can inject javascript into websites with android, but I am not sure how.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No quotes on the value in url-encoded bodies.

And I have no idea about Android, but if that's true.... wow!
 
reply
    Bookmark Topic Watch Topic
  • New Topic