Hi
I am getting above error on below code
var client = new RestClient("api.nimbuspost.com/v1/courier/serviceability");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
Thanks
Sandhiya PriyaPosted Jan 7, 2026, 4:31 AM
That error usually means your client never actually reached the API endpoint — the request failed at the network layer before any response was returned. A few common causes in your code:
Issues in Your Code
Missing scheme (
https://)You wrote:
This is not a valid URL. It should be:
Authentication
NimbusPost’s API requires an API key / token in the headers. Without it, the server may reject the request. Example:
Timeout
Setting
client.Timeout = -1;disables timeout. If the server is unreachable, your call may hang or throw a network error. Use a reasonable timeout (e.g., 30 seconds).Content-Type header
For a GET request,
Content-Type: application/jsonis not necessary. It’s usually used for POST/PUT with a body. Some APIs may even reject it.Corrected Example
Checklist
Use full URL with
https://Add required Authorization header
Set a proper timeout
Remove unnecessary headers for GET
Rajesh GamiPosted Dec 27, 2022, 1:30 PM
Hi Ramco
First, try a curl request to your backend integration endpoint using the same parameters that you expect API Gateway to pass. Confirm that the request completes and takes less than 29 seconds, which is the API Gateway timeout.
Next, try calling your API via the test facility in the API Gateway console and inspect the output to get more information. Confirm that API Gateway is calling the correct endpoint and is passing the header and body values that you expect. Also, observe any error messages from calling the integration endpoint.
If that doesn't help, then enable CloudWatch logs on your deployed API, make a few test requests, and inspect the resulting logs.
If you're still unable to figure it out, you can post the output from the previously mentioned steps along with a swagger export of your API. If any of these contain sensitive information, you can PM them to me instead.