I'm working on an app using the apache httpclient connecting to a http post base API. Im able to authenticate and println my retun. errorcode = 0 and Seesionis=1234567. now I need to repost this seesionid to other methods. This is an app so there is no cookie to store. Im assuming I could store this to memory, or does httpclient do that for me? if so how does that work when reposting.
Why would there be no cookie to store? You're making an HTTP connection, right? I think cookie support is turned on by default, but you should check that to make sure. And *I think* you need to reuse the same HttpClient object, each may have have its own set of cookies.
Ping & DNS - updated with new look and Ping home screen widget
Joined: Mar 09, 2013
well, Im not going to be using a web browser. just the app. it will be talking to an API server within an app.
I can get a seesion to retun. lets say seesion id=xyz123
now I can execute within that method with a seesionid variable but if I go out of scope that variable is not longer valid. I'd like to have an authentication class and just use that for session getting and run url repost like
Yes, I was confused about how cookies were used in the httpclient library and assumed it was only for browser usage. I'm going to go thought the cookie docs and sample code and rework the app. I'm sure i'm on the right path now. Thank You.