Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Flash18
Apr 3, 2009
I'm hoping someone here has some experience with HttpUrlConnection, which is causing me a lot of aggravation. The API I'm using insists that that my request needs to use basic authentication, which I assume I'm using properly, as I've just copied to exactly from HttpUrlConnection's page in the API.

None-the-less, I keep returning an IOException any time I try to read the response, with the details being "No authentication challenges found".

I fired off a quick request using curl on the command line, encoded correctly, and the server gave me a correct response.

I tried HttpClient, but I couldn't work out how to use basic authorization with it, but I got a "Not Authorized" response as I expected.

Using an incorrect url in the request will give me 404 error.

I'm assuming now I'm either doing something horribly wrong, or something is up with their server and I need to use preemptive basic authentication. I haven't found anything helpful on preemptive authentication on google, everything I tried still results in the same error.

Adbot
ADBOT LOVES YOU

Flash18
Apr 3, 2009
Unfortunately I've already gone over that and tried it, didn't work :(

edit: Got it working using AQuery, although I need to use their deprecated auth library.

Flash18 fucked around with this message at 15:45 on Jul 25, 2012

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply