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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:21:11+00:00 2026-05-27T13:21:11+00:00

Never called an API before and not sure which classes to use in ASP.NET

  • 0

Never called an API before and not sure which classes to use in ASP.NET
to do so. I could probably scrape an understanding together from reading
various examples of calls to other services, but was hoping someone could
suggest which ones would be more specific to my needs so I can get a quick start
on things. An example of calling this API with PHP script is located below, so if someone could punch
out some code using the HttpWebRequest and WebClient, seeing it in action would be great
for said example as well as capturing the reply from the API in the HttpRequest. Also is it possible to call such API’s from the client/browser using Jscript or must these calls be made from serverside and result passed to client after ?

    OUTPUT: The API will output the fields below:

error   If any error occurs while processing your request, this field will contain an error message. Otherwise, 'OK' will be returned.
eta It's a string containing the Estimated Time of Arrival
price   The price charged to deliver the goods. GST is already included.
Note that in the output, fields will be line-separated (character '\n') and each line will contain a field name and respective value separated by '='. See example below.

error=OK
eta=Overnight
price=14.52
The following piece of code is a simple example of how to access our Calculator API using PHP.

<?
$calculator_url = "http://www.e-go.com.au/calculatorAPI";

/* from/to postcodes */
$pickup   = 2000; //From Sydney
$delivery = 4000; //From Brisbane

/* Dimensions */
$width  = 40;
$height = 35;
$depth  = 65;
$weight = 2;

$ego_params  = "?pickup=$pickup&delivery=$delivery";
$ego_params .= "&width=$width";
$ego_params .= "&height=$height&depth=$depth&weight=$weight";
$ego_quote  = file($calculator_url . $ego_params);

foreach ($ego_quote as $num=>$quote) {
    $quote = trim($quote);
    $quote_field = explode("=", $quote);
    print "Field=" . $quote_field[0] . "\tValue=" . $quote_field[1] . "\n";
}
?>
  • 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-27T13:21:12+00:00Added an answer on May 27, 2026 at 1:21 pm

    Just use WebClient.DownloadString:

    http://msdn.microsoft.com/en-us/library/fhd1f0sw(v=vs.80).aspx

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

Sidebar

Related Questions

Please see code below. The destructors are never called. Anyone know why and how
Why does an event handler never get called if it's added within a loop
Here is my code stub for my app-delegate.m -- it never gets called. -
I was using a CASE called MAGIC for a system I'm developing, I've never
When using drawRect for a custom UIButton subclass, it never seems to get called
Never used a cache like this before. The problem is that I want to
Never sure where to place functions like: String PrettyPhone( String phoneNumber ) // return
Never ran into this problem with jQuery before. I have the following: $(document).ready(function() {
I am developing a Google Chrome extension, and need to use the chrome.experimental.webRequest API.
I recently had an app rejected because it called a private API - 'hideKeyboard'.

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.