Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Pass variable to HttpURLConnection

  1. #1
    Junior Member
    Join Date
    Mar 2019
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Pass variable to HttpURLConnection

    Hello everyone

    I'm trying to pass the matchday to the URL for the Http connection. I know I can't get a value from the EditText in the doInBackground method so I thought to get the value in the onPreExecute method. Of I then add the variable to the URL, the program doesn't recognise the String. I saw on StackOverflow you need to add the parameters in the execute method but I don't really have got that part of the explanation.

    Does anyone have an idea how to add the matchday to the URL, entered in the EditText matchdayText?

    Thanks in advance!
    Rob Nickmans

    --- Update ---

    Link to Codepen because the forum won't post my thread because of the URL: https://codepen.io/nickmansrob/pen/oVoeoa

  2. #2
    Member
    Join Date
    Aug 2013
    Posts
    95
    Thanks
    3
    Thanked 14 Times in 14 Posts

    Default Re: Pass variable to HttpURLConnection

    post your code in this forum, don't link to it.

Similar Threads

  1. Java HTTPURLConnection
    By mike2033 in forum What's Wrong With My Code?
    Replies: 16
    Last Post: May 1st, 2013, 04:33 PM
  2. Replies: 1
    Last Post: August 8th, 2012, 11:46 PM
  3. Replies: 1
    Last Post: January 17th, 2012, 10:25 AM
  4. how to pass a variable from a method to another
    By amr in forum Java Theory & Questions
    Replies: 1
    Last Post: November 20th, 2010, 10:32 PM
  5. Replies: 0
    Last Post: April 17th, 2010, 08:29 AM