Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7040245
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:53:44+00:00 2026-05-28T01:53:44+00:00

Im using HttpCLient to autoLogin a website. I an getting statusCode as ‘200’. API

  • 0

Im using HttpCLient to autoLogin a website. I an getting statusCode as ‘200’. API says SC 200 – OK. what does that mean? Login is established?
When I see the list of statusCodes there is SC Accepted – 202. What is the difference between Accepted and OK.
If login is established what status code should I get? Please help.

pesudo code if this helps to answer:

import java.io.IOException;

import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;

public class HttpTest {
    public static void main(String args[]) throws HttpException, IOException {

    HttpClient client = new HttpClient();

    // make the initial get to get the SESSION cookie
    GetMethod get = new GetMethod(
    "http://www.yahoo.com/");
    client.executeMethod(get);
    get.releaseConnection();

    // authorize
    PostMethod post = new PostMethod(
    "https://login.yahoo.com/config/login?");
    NameValuePair[] data = {
    new NameValuePair("login", "aaa@yahoo.com"),
    new NameValuePair("passwd", "bbb")
    };
    post.setRequestBody(data);
    client.executeMethod(post);
    post.releaseConnection();

    //resubmit the original request
    client.executeMethod(get);
    String response = get.getResponseBodyAsString();
    get.releaseConnection();
    System.out.println("Status Code :::"+get.getStatusCode());
    System.out.println(response);    
    }
}

This is the form based authentication i hvae been trying. I am getting the same issue here…200-ok for improper credentials. Im using a common website like yahoo to login. Any advice?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T01:53:44+00:00Added an answer on May 28, 2026 at 1:53 am

    Java’s HttpClient status codes are the same as the status codes defined in RFC1945 (HTTP 1.0), RFC2616 (HTTP 2.0) and RFC2618 (WebDAV).

    These specific codes mean:

    200 OK

    The request has succeeded. The information returned with the response is dependent on the method used in the request, for example:

    GET an entity corresponding to the requested resource is sent in the response;

    HEAD the entity-header fields corresponding to the requested resource are sent in the response without any message-body;

    POST an entity describing or containing the result of the action;

    TRACE an entity containing the request message as received by the end server.

    202 Accepted

    The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place. There is no facility for re-sending a status code from an asynchronous operation such as this.

    The 202 response is intentionally non-committal. Its purpose is to allow a server to accept a request for some other process (perhaps a batch-oriented process that is only run once per day) without requiring that the user agent’s connection to the server persist until the process is completed. The entity returned with this response SHOULD include an indication of the request’s current status and either a pointer to a status monitor or some estimate of when the user can expect the request to be fulfilled.

    For definitions of the other common HTTP status codes, see RFC2616

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using Apache HttpClient 3.x for contacting a Big IP that will then redirect
I'm using HttpClient on Android to connect to https://someUrl.com/somePath . The problem is that
We're using HTTPClient to implement a REST API. We're reading the server response using:
How can I avoid circular redirect using HttpClient 4.1.1. As I am getting the
I have an AsyncTask that handles a rather long download, using HttpClient. I'd like
Using HttpClient 4.1.0, we're trying to connect to a remote server that normally would
I am using Jakarta Commons HttpClient 3.1 writing a load test tool that needs
I am currently using HttpClient from Android to get the full contents of website
I want to login to a site using HttpClient and after logging in I
Im using HttpClient to access a particualr website and the response i get is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.