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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T12:02:01+00:00 2026-05-31T12:02:01+00:00

The response I get to an LWP request is application/x-www-form-urlencoded is it possible convert

  • 0

The response I get to an LWP request is application/x-www-form-urlencoded is it possible convert the text of this to a hash via some object method?

  • 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-31T12:02:02+00:00Added an answer on May 31, 2026 at 12:02 pm
    # from a HTTP::Response object
    my $urlencoded = $response->content;
    
    1. Vars in CGI returns a hash.

      use CGI qw();
      CGI->new($urlencoded)->Vars;
      
    2. parameters in Plack::Request returns a Hash::MultiValue object, which is actually the appropriate data structure for this.

      use Plack::Request qw();
      Plack::Request->new({QUERY_STRING => $urlencoded})->parameters;
      
    3. param in APR::Request/libapreq2 – not quite a Perl hash, but an XS object with attached Magic whose behaviour is close enough.

      insert hand-waving here, no libapreq2 available right now for testing
      
    4. url_params_mixed in URL::Encode

      require URL::Encode::XS;
      use URL::Encode qw(url_params_mixed);
      url_params_mixed $urlencoded;
      
    5. parse_query_string in CGI::Deurl::XS

      use CGI::Deurl::XS 'parse_query_string';
      parse_query_string $urlencoded;
      
    6. query_form in URI serves well, too, in a pinch; and so does query_form_hash in URI::QueryParam.

      use URI qw();
      URI->new("?$urlencoded")->query_form;
      
      use URI::QueryParam qw();
      URI->new("?$urlencoded")->query_form_hash;
      
    7. Bonus: also see HTTP::Body::UrlEncoded, as used by Catalyst.

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

Sidebar

Related Questions

When I make HTTP Request in JMeter I get Response data like This page
I am getting new_tag from a form text field with self.response.get(new_tag) and selected_tags from
Is it possible to get response from Graph API (or FQL) that will list
I get this response: {success:true,errorCode:-1,error:} No HTML inside the JSON, but the js say
I am implementing an application with get the response from service and show to
I am trying to use LWP::Simple to make a GET request to a REST
I get this warning on response.GetResponseStream() How should I handle this? // Get response
I have to get response text from a resourceindex page as JSON object. When
I am using a API to get some data from curl. Response i get
our $ua = LWP::UserAgent->new; my $response = $ua->get($url); if($response->is_success) { my $perl_hash_or_arrayref = decode_json(encode(UTF-8,

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.