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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T06:47:10+00:00 2026-05-17T06:47:10+00:00

This may or may not be the dumbest question ever. I’m using Restlet. When

  • 0

This may or may not be the dumbest question ever.

I’m using Restlet. When the client (which I do not control) POSTs to the URL, I can call the function:

representation.getText();

Which produces the following example list of key-value pairs in string form:

CallStatus=in-progress&CallerCountry=US&CalledZip=24013&ApiVersion=2008-08-01&CallerCity=ARLINGTON&CalledCity=ROANOKE&CallSegmentGuid=&CalledCountry=US&DialStatus=answered&CallerState=VA&CalledState=VA&CallerZip=22039

How can I access this data as a Map of key-value pairs in Restlet?

ANSWER:

Form newForm = new Form(getRequest().getEntity());
  • 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-17T06:47:11+00:00Added an answer on May 17, 2026 at 6:47 am

    Check out these examples quoted from restlet.org (a Form is like a Map):

    Getting values from a web form

    The web form is in fact the entity of the POST request sent to the server, thus you have access to it via request.getEntity().
    There is a shortcut which allows to have a list of all input fields :

    Form form = request.getEntityAsForm();
    for (Parameter parameter : form) {
      System.out.print("parameter " + parameter.getName());
      System.out.println("/" + parameter.getValue());
    }
    

    Getting values from a query

    The query is a part of the identifier (the URI) of the request resource. Thus, you have access to it via request.getResourceRef().getQuery().
    There is a shortcut which allows to have a list of all “key=value” pairs :

    Form form = request.getResourceRef().getQueryAsForm();
    for (Parameter parameter : form) {
      System.out.print("parameter " + parameter.getName());
      System.out.println("/" + parameter.getValue());
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this may just be the dumbest question I have asked yet. But I can
This may not be a programming question, but I don't know where to ask
This may not be the kind of question one should ask on StackOverflow, but
Sorry, this may or may not be a programming question directly, but I am
This question may not directly relate to programming. I have noticed that the technology
This may seem a basic question but my is not currently working. I am
This may not be the typical stackoverflow question. A colleague of mine has been
I know this may not be exactly a coder question, but I feel it
I realize this may not be the best forum in which to ask this
Depending on your interpretation this may or may not be a rhetorical question, but

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.