Multiple posts to HttpURLConnection

I am able to post data and read the response on a HttpURLConnection, and I am able to do so repeatedly if I execute multiple URL.OpenConnection methods, create new input and output streams, etc.

Do I have to repeat all of these steps each time I want to do a POST/Read to the UL?

Thanks
LVL 1
garyz31Asked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
I'd say you'd have to call openConnection each time then.
Have you just tried reading the response status? This should be enough to make the post happen.
0
 
objectsCommented:
Depends on the HTTP server/servlet/cgi and proxys you are talking to.
0
 
garyz31Author Commented:
These are asp pages.
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
garyz31Author Commented:
I've also noticed that if I post data to a page, then I must read the response in order for the post to happen.  This seems to be the case even if the page doesn't have any response.  

Are my parameter settings causing this?
0
 
garyz31Author Commented:
Reading the response code does cause the post to happen.

Thanks
0
 
objectsCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.