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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:15:56+00:00 2026-06-15T21:15:56+00:00

I have a json URl like https://landfill.bugzilla.org/bugzilla-tip/jsonrpc.cgi?method=Product.get&params=[{ids:4}] I want to pass this as URL

  • 0

I have a json URl like “https://landfill.bugzilla.org/bugzilla-tip/jsonrpc.cgi?method=Product.get&params=%5B{“ids”:”4″}]”

I want to pass this as URL in c# program. below is the code snippet. How can i pass the arguments like ids as above?

try
{
    string url="https://landfill.bugzilla.org/bugzilla-tip/jsonrpc.cgi?method=Product.get";
    string ret = string.Empty;
    StreamWriter requestWriter;
    var webRequest = System.Net.WebRequest.Create(url) as HttpWebRequest;
    if (webRequest != null)
    {
        webRequest.Method = "GET";
        webRequest.ServicePoint.Expect100Continue = false;
        webRequest.Timeout = 20000;

        webRequest.ContentType = "application/json";        
    }
    HttpWebResponse resp = (HttpWebResponse)webRequest.GetResponse();
    Stream resStream = resp.GetResponseStream();
    StreamReader reader = new StreamReader(resStream);
    ret = reader.ReadToEnd();
    return ret;
}
catch (WebException exception)
{
    string responseText;
    using (var reader = new StreamReader(exception.Response.GetResponseStream()))
    {
        responseText = reader.ReadToEnd();
    }
    return responseText;
}
}

Need to pass “ids” as argument, please help.

  • 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-15T21:15:57+00:00Added an answer on June 15, 2026 at 9:15 pm

    If you know how Url looks like and sure that argument are Url-safe (like int) you can simply use String.Format to construct it:

     int id = 4;
     var url = String.Format("https://landfill.bugzilla.org/bugzilla-tip/"
           + "jsonrpc.cgi?method=Product.get&params=[{{\"ids\":\"{0}\"}}]", id);
    

    Note that this is not good way of contructing Url – it only would be ok for one-time-use code and when you know that inserted parameters are Url-safe. Proper approach would be to use Uri class or approaches from How to build a query string for a URL in C#?

    If you need ot construct more complex parameter (like array of IDs) – use jbehren suggestion for JSON serializtion.

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

Sidebar

Related Questions

Suppose I have a url like: http://example.com/get-users which returns a JSON object of all
I have a jQuery AJAX function like this: $.ajax({ url: 'crud/clients.php', dataType: 'json', type:
I have a url which have a response in Json lon=-0.1275&pg=0 I parsed the
I have a url [https://www.inquicker.com/facility/americas-family-doctors.json] that is a JSON data url. How can I
Itunes provide URL or all apps in App-store like to get details in JSON/XML
I have a json file being stored in a static url, i would like
I have a json feed from this URL which contains 20 fields and I
I have a YQL output JSON string at this URL: YQL JSON I found
I have the following simple jquery snippet $(document).ready(function () { $.ajax({ url:myjson.json, dataType: 'json',
I have a grid on my page. $(#listU05).jqGrid({ url:'u05json.json', datatype: 'json', mtype: 'POST', colNames:[

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.