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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:20:52+00:00 2026-06-07T23:20:52+00:00

I have defined GET method as described below: @GET @Produces(text/plain) @Path(method/{id}/{value}) public void method(@PathParam(ids)

  • 0

I have defined GET method as described below:

@GET
@Produces("text/plain")
@Path("method/{id}/{value}")
public void method(@PathParam("ids") final String id, @PathParam("value") final String value) {}

It allows me to pass one id and value. How can I pass a bunch of pairs id/value to this 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-06-07T23:20:53+00:00Added an answer on June 7, 2026 at 11:20 pm

    one way to do it is to create your-own-protocol, something like this:

    method/1,2,3,4,5,6,7/one,two,three,four,five,six,seven

    and then, in your code parse the “protocol”:

    public void method(@PathParam("ids") final String idStr, @PathParam("value") final String valueStr) {
        String[] ids = idStr.split(",");
        String[] values = valueStr.split(",");
    }
    

    but it pretty ugly

    the second one is to use POST body, in that case you can’t use GET, and you should create a ValuesMapObject, that holds a map between each id to it value and send it from the client, in that case the function will be look like this:

    @POST
    @Produces("text/plain")
    @Consumes(MediaType.APPLICATION_XML)
    @Path("method/ids_and_values")
    public void method(ValuesMapObject values) {}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two entities, defined as following public class Corporation { public int Id{get;set;}
In express, I have defined some routes app.post(/api/v1/client, Client.create); app.get(/api/v1/client, Client.get); ... I have
I have a route defined like this: GET /question/:q_id controllers.Questions.viewQuestion(q_id: Long) Then in my
Why do I get a CS5001: does not have an entry point defined error
I have defined a ConfigurationProperty class, which is basicly a key-value pair (with key
I have defined a custom cell with an UISwitch control, is the GetCell method
I have defined insert method for my table in android application as follow :
Hopefully I've described it correctly. I have a 'generic method' which looks like the
I have a webservice defined here: /app/AutocompleteManager.asmx [WebMethod] public string AutocompleteComposers() { return hey,
I have defined a class to process a file but get the following error

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.