Questions tagged [getasync]
50 questions
0
votes
1 answer
Method with await GetAsync API call exits without a returning a result or running all code in the method
Borrowing from the Get method in https://learn.microsoft.com/en-us/aspnet/web-api/overview/advanced/calling-a-web-api-from-a-net-client I have written the following. While being new to C# I assumed the await would complete the API call then move on,…

Dave F
- 151
- 14
0
votes
1 answer
multiple files download using httpclient
I am working on xamarin.forms application. I want to download multiple files simultaneously using HttpClient. If there is multiple files then I am getting : System.IO.IOException:Sharing violation on path . Is there anything that has to be improved…

Dhruv Gohil
- 503
- 1
- 5
- 13
0
votes
0 answers
HttpClient.GetAsync fails after running for some time with TaskCanceledException "A task was cancelled"
I am using GetAsync method to retrieve the response from the server. The following code runs fine for the first two iterations and then errors out with the message "A task was canceled". I searched online but didn't find any workaround. There was a…
0
votes
0 answers
Xamarin - httpClient.GetAsync works on IOS but not Android
I use this code to get some Json text:
response = await _httpClient.GetAsync(Gurl).ConfigureAwait(false);
the Gurl is correct. This works fine on the IOS simulator, but does not work in Android.
In android it works if I call the page like…

sharkyenergy
- 3,842
- 10
- 46
- 97
0
votes
1 answer
node js getasync with promise enlarge buffer
I am executing some cmd commands with getasync and it gives me this error:
Unhandled rejection RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stderr maxBuffer length exceeded
The output is quite large, but I need it to debug the underlying python…

Leo
- 222
- 1
- 4
- 15
0
votes
1 answer
localhost route not working should be returning JSON back when locating to URL
My fellow programmers, I basically have this async Get() method which is reading Json data successfully, but when locating to route -> localhost:59185/api/encompass/data I receive a message:
No HTTP resource was found that matches the request URL…

fay
- 13
- 9
0
votes
1 answer
Xamarin Forms: GetAsync not working in SearchBar event handler
I am attempting to make a simple app that enables the user to search for movies using themoviedb api. If I hardcode my search query in the OnAppearing my method, GetAsync works perfectly. However, if I try and take the search term from the user in a…

Cian Mc Sweeney
- 1
- 2
0
votes
0 answers
VB.Net 2017 Studio, Do I need a Keyboard Hook? Do any one have a great solution?
I'm trying to make a prog, that should listen global to the keyboard and to work with the imput. Is it possible when the key "d" was pressed, to block the current input(don't output the "d") and do the follow: SendKeys.Send("δ")
δ = greek d…

Alex
- 1
- 1
0
votes
0 answers
How to get a "Stream" with the GetAsync method of HttpClient in C# MVC?
I'm trying to get a "stream" object through an api, and then upload it to a message that will be sent by mail. The whole process WORKS, but the problem is when viewing the documents, because when I enter the inbox of any of the recipients, and try…

DISDEL SA DISDEL
- 1
- 1
0
votes
1 answer
GetAsync and PostAsJsonAsync methods passing parameters JsonReaderException error
I am trying to build a client side of making requests. So i do not know how i pass parameters on GetAsync method. The same problem on PostAsJsonAsync method.
Here is my code:
public static async Task
- > GetUsers(HttpClient client, Users…

Thomas Athanasiou
- 121
- 1
- 2
- 11
0
votes
0 answers
i want to get id from deserializedobject list in xamarin
var httpClient = new HttpClient();
var response = await httpClient.GetAsync("URL");
if (response.StatusCode == HttpStatusCode.OK){
var result = response.Content.ReadAsStringAsync().Result;
if (result == "[]")
…
0
votes
1 answer
C++: GetAsyncKeyState() does not register key press immediately
In the program I am writing when I hit the 'escape' key, I want it to register immediately, even during the sleep period. Currently it waits until the end of the sleep statement before registering the key press. The sleep time is important to the…

Grehgous
- 109
- 2
- 13
0
votes
0 answers
httpclient getasync method fails on some networks
I wrote a Xamarin Forms application. It uses HttpClient. Code of my method is
public static async Task
- > SearchRidesAsync(string fromCity, string toCity, DateTime date, string type = "shares", CancellationToken token =…

Barbara Pušnar
- 1
- 1
0
votes
0 answers
Get Header from HTTPClient.GetAsync [C#]
I have a problem with GetAsync. When i execute the instruction i get this response from fidder.
Debugging I can find all headers except the Transport Header which has a parameter that I need, which is FID. How could I get this one?
Here's the code…

Aldridge1991
- 1,326
- 6
- 24
- 51
0
votes
0 answers
HttpClient.GetAsync unable to connect to the remote server
I have a Windows 8.1 application running on a Windows 10 Enterprise tablet. This app is calling an ASP.NET RESTful Web API running on a remote server. The Web API is using Windows Authentication. I have Fiddler installed on the tablet and I can make…

Eddie
- 271
- 4
- 18