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 882109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:22:32+00:00 2026-05-15T12:22:32+00:00

I need to pass from commons-httpclient-3.0.jar to commons-httpclient-3.1.jar but changing the jar my code

  • 0

I need to pass from commons-httpclient-3.0.jar to commons-httpclient-3.1.jar
but changing the jar my code doesn’t work any more.
The problem is that the new library encode automatically the passed uri.
Is there a way to avoid this?
I must interact with Yahoo API and I mustn’t encode the URI otherwise I can’t access to the services.
Here there is a scratch of my code, comparing the two printing line I observe the difference between the passed URI and the used one.

 GetMethod getMethod = new GetMethod();
    try {
        URI uri = new URI(DeliciousApi.generateRequestToken(), false);
        getMethod.setURI(uri);
        System.out.println("Passed URI: " + uri.getURI());
        int statusCode = client.executeMethod(getMethod);
        if (statusCode != HttpStatus.SC_OK) {
            System.out.println("Used URI: " + getMethod.getURI());
            System.err.println("getMethod failed: " + getMethod.getStatusLine());
        }

And this is the output:

Passed URI: https://api.login.yahoo.com/oauth/v2/get_request_token?oauth_nonce=ce4630523j788f883f76314ed3965qw9&oauth_timestamp=1277236486&oauth_consumer_key=hd7sHfs5YVFuh3DRTUFgFgF7GcF4RDtsTXStGdRyJJf7WSuShQAShd2JdiwjIibHsU8YFDgshk7hd32xjA6isnNsT7SkbLS8YDHy&oauth_signature_method=plaintext&oauth_signature=53h8x475a66v238j7f43456lhhgg8s7457fwkkdd%26&oauth_version=1.0&xoauth_lang_pref="en-us"&oauth_callback=oob
Used URI:   https://api.login.yahoo.com/oauth/v2/get_request_token?oauth_nonce=ce4630523j788f883f76314ed3965qw9&oauth_timestamp=1277236486&oauth_consumer_key=hd7sHfs5YVFuh3DRTUFgFgF7GcF4RDtsTXStGdRyJJf7WSuShQAShd2JdiwjIibHsU8YFDgshk7hd32xjA6isnNsT7SkbLS8YDHy&oauth_signature_method=plaintext&oauth_signature=53h8x475a66v238j7f43456lhhgg8s7457fwkkdd%2526&oauth_version=1.0&xoauth_lang_pref=%22en-us%22&oauth_callback=oob

getMethod failed: HTTP/1.1 401 Forbidden

coppia: oauth_problem signature_invalid

particolarly:

%26&oauth_version –> %2526&oauth_version

and

xoauth_lang_pref=”en-us” –> xoauth_lang_pref=%22en-us%22

  • 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-15T12:22:33+00:00Added an answer on May 15, 2026 at 12:22 pm

    You can avoid encoding by doing this,

          URI uri = new URI(DeliciousApi.generateRequestToken(), true);
    

    However, you might get exception on your original URL, which is not properly encoded. You need to encode double quotes. Even better, get rid of it.

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

Sidebar

Related Questions

I have a server script that I need to pass data to from the
I need to pass values from my asp.net code to a javascript code block
I need to pass an array from JavaScript to a page method in C#.
I need to pass an url from asp.net load_page to flowplayer javascript function here:
I have an application in which I need to pass an array from C#
i need to pass a long list of Ids from one page to another,
I have multiple projects that need to pass user login information to common-api project
I need to execute some tests with maven, and pass a parameter from the
i need to pass values from one class to another and asked me what
I need to pass data from controller to view. I used loop in controller

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.