Questions tagged [httpclient]

DO NOT USE - Use [apache-commons-httpclient], [apache-httpclient-4.x], [jetty-httpclient], [java-http-client], [dotnet-httpclient] or [angular-httpclient]

Filter by
Sorted by
Tagged with
0 votes
0 answers
33 views

How to create a HttpClient that calls external Urls, Like Google.com c#

I want to call an api (google recaptcha api) from blazor webassembly client or my api server, When I debug and record my parameters and make a url with them and call the google api with this url ...
mz1378's user avatar
  • 2,079
0 votes
1 answer
28 views

Increase the idle time after connection is established in Flutter

If a connection is established, it will be closed after 15 seconds (if I am wrong please let me know the connection closing time), and the idle time cannot be extended. In my situation, multiple ...
Dharanidharan's user avatar
0 votes
1 answer
29 views

socket.gaierror: [Errno 11001] getaddrinfo failed when using HTTP Client python

I'm new in python, using http client to send GET request. my code is: payload = '' headers = { 'Authorization': 'Bearer [accf90.................e]', 'Accept-Encoding': 'gzip, ...
Hiba's user avatar
  • 3
2 votes
0 answers
41 views

Task cancel in calling between Web API endpoints

I am getting task was cancel error calling between two Web API endpoints. The error is occurring intermittently. I have used a single HttpClient in my app to avoid socket exhaustion. We are getting ...
manthan's user avatar
  • 132
0 votes
0 answers
71 views

BackSlash Converted to %5C with HTTPCLient C#

I don't understand how the conversion of my API request is managed: Here is the source code: { private UC_html uc; private string request; HttpClient client; private string ...
Nael Durand's user avatar
0 votes
0 answers
11 views

How to override the read timeout in Restlet Framework

We're facing here a problem with long term request, which gets a read timeout (java.net.SocketTimeoutException: Read timed out) leading the an HTTP ERROR 1001: Communication Error (1001) - The ...
Marek's user avatar
  • 51
0 votes
1 answer
30 views

Micronaut Docker issue with httpClient

Facing issues with read timeout and slow HTTP responses when running my Micronaut application as a docker Container. The application is hitting another rest API using HTTPClient ( tried both ...
Michael George's user avatar
0 votes
0 answers
24 views

How to get connection pool metrices of JDK native HttpClient?

I am using JDK native HttpClient in my application. I want some insights into the http connection pool e.g. no of active connections with each of the downstream, idle connections etc. and create a ...
Harsh Agarwal's user avatar
0 votes
1 answer
738 views

Angular detected that `HttpClient` is not configured to use `fetch` APIs. (Angular 17 - SSR)

I got this error after updating to angular 17: NG02801: Angular detected that `HttpClient` is not configured to use `fetch` APIs. It's strongly recommended to enable `fetch` for applications that use ...
Amir Abaris's user avatar
0 votes
1 answer
27 views

DelegatingHandler not working using Refit in a .NET MAUI App

I have this DelegatingHandler (see final part of this post) that i use in all my mobile apps, this allows me to see in Output Window of my IDE all the Network stuff, very neat. Feel free to use it Now,...
Ferccino's user avatar
-1 votes
1 answer
27 views

Could a CURL call has no '--request' param?

What is the difference between following two requests. Second one has no '--request' param, what does it mean? First call returns auth token, second one returns metadata of an object with certain id ...
Volodymyr Lytvyn's user avatar
-3 votes
0 answers
64 views

Problem with new StringContent() creation for HTTPClient POST request

I have a JSON given as: { "feeAmount": 100.00 } Creating a StringContent object out of it using: new StringContent(myJson, Encoding.UTF8, "application/json") The value of ...
Mehdavi5's user avatar
  • 155
-3 votes
1 answer
51 views

Http Post Json in VS2022 C#

I have json file. When I send it by Postman (Application) it works but in C# code I get "Bad Request" The Json File: { "name": "Token", "request": { ...
Esmail's user avatar
  • 5
0 votes
0 answers
46 views

How to measure bytes transmitted out for per request by using Apache HttpClient?

I'm using Apache HttpClient(5.2.1) to call requests, use PoolingHttpClientConnectionManager to manager connect, and the HTTP content compressing with Gzip. HttpEntity entity = new ...
WWW's user avatar
  • 1
0 votes
0 answers
15 views

UWP API Client throws ObjectDisposedException in response.Content and returns partial data

I have a UWP client which sends a POST request to a ASP Core Server to request data from a database. The request returns a success code 200, but the deserialized data is incomplete, and by checking ...
pft1's user avatar
  • 11
0 votes
1 answer
19 views

Spring-boot AwsCrtAsyncHttpClient and NettyNioAsyncHttpClient both in class path

In my application, I am using a custom implemented AWS SNS module. Within that module, I do create a bean of AwsCrtAsyncHttpClient for the SnsAsyncClient usage. However, I am getting the following ...
Sankalpa Wijewickrama's user avatar
0 votes
1 answer
31 views

How automate the fingerprints updating of Firebase (Arduino-Master-Library)

I have developed a hardware-based project using esp32 board in ARDUINO, I am using firebase to upload data of sensors to the Firebase realtime database. I am using "firebase-arduino-master" ...
JAWAD KHAN's user avatar
0 votes
0 answers
33 views

AWS SQS message push taking 50 secs

For some of the requests, sqsClient send message taking 50+ seconds to push message in SQS queue. How to pass CLientConfiguration so that timeout happens quickly and accordingly retry happens. Tried ...
Ashish Gupta's user avatar
0 votes
0 answers
42 views

Customize Request Timeout while publish message to SQS using java sdk - Reducing SQS Message Processing Time: Minimizing Retries after 10 Seconds

We are using SQS in our Java Spring Boot Project. While publishing messages to SQS, most of the messages are processed in <=300ms. However, some requests took more than 50 seconds. Upon initial ...
Piyush Maheshwari's user avatar
0 votes
0 answers
38 views

Apache HttClient with Proxy not working in the Tomcat

I have a web application, made using Jsf and Apache HttpClient. When trying to consume an Api that requires a Proxy for communication, if I run the code via the command line on the server it works, ...
Emmanuel Thadeu Souza Trindade's user avatar
1 vote
0 answers
28 views

How to set TLS version at request level?

We have an application in .Net Framework 4.7 which hosts multiple API endpoints. The application is deployed in multiple servers (some of them are old) and TLS 1.2+ is not enforced from them. This is ...
Saket Kumar's user avatar
  • 4,443
0 votes
1 answer
52 views

Blazor: An invalid request URI was provided when using GetFromJsonAsync from wwwroot json file

While taking the code from the sample webassembly template, and applying it the server app, I am attempting to read in a json file located in the wwwroot directory: { forecasts = await Http....
Brad's user avatar
  • 49
0 votes
0 answers
56 views

Why Request timeout occurs when a request is attempted beyond the "Ktor HttpClient(CIO) maxConnectionsCount" or "maxConnectionsPerRoute" value

"KtorBase2.kt" open class KtorBase2() { private val _httpClient: HttpClient val httpClient get() = _httpClient init { _httpClient = createHttpClient() } private ...
newmanjoo's user avatar
0 votes
0 answers
17 views

.NET HTTP Client 4.0.0 is ignoring the DefaultRequestHeader value while a PostAsync request

I am using HttpClient for my http POST request. I have a perfectly working code in .NET 6.0 (HTTP Client 6.0.0) in which I am passing my DefaultRequestHeader.Add("Cookie", seesionID), but I ...
Tassawar Younas's user avatar
0 votes
1 answer
90 views

Calling SOAP Action from .NET 6 HttpClient - Getting Error

I need to call SOAP action based on specs that I have. I have already create the SOAP message and need to send it. I configured HttpClient but every time I send a post message I get Service ...
cITsecure's user avatar
  • 144
2 votes
1 answer
32 views

Configuring HttpClient and IHttpClientFactory in Autofac using autofac.json

I'm working on an ASP.NET project using Autofac for dependency injection, and I have a service that relies on HttpClient. I've registered IHttpClientFactory in my Startup.cs and use it to create ...
f soltanzadeh's user avatar
0 votes
0 answers
30 views

HttpClient - The underlying connection was closed: The message length limit was exceeded

I use .Net Framework 4.6.1 HttpClient to call my .Net API 2 and received the error: The underlying connection was closed: The message length limit was exceeded. It's seem the ETag response header ...
Rango's user avatar
  • 2,004
-1 votes
1 answer
133 views

Using HttpClient with .NET 6 C#, I'm getting a decryption error when making an http post request

I have been getting the following exception: System.IO.IOException: The decryption operation failed, see inner exception. System.ComponentModel.Win32Exception (0x80090326): The message received was ...
cITsecure's user avatar
  • 144
1 vote
0 answers
13 views

Type 'typeof HttpHandler' is not assignable to type 'TypeProvider'

Type 'typeof HttpHandler' is not assignable to type 'TypeProvider'. Cannot assign an abstract constructor type to a non-abstract constructor type I import the TranslateModule in the page’s *.module.ts ...
Rei Daci's user avatar
1 vote
1 answer
54 views

F# HttpClientHandler Dispose

While it's generally advised not to create an instance of HttpClient for each request, there might be exceptions, like when an instance is conditionally created based on whether a proxy should be used....
Wizr's user avatar
  • 163
1 vote
1 answer
30 views

angular16: operate data before return it

enter image description here angular16 httpclient How could I format the data before returning it? This has been confusing me. I tried to use "subscribe" "map" but it did not ...
Qiu h's user avatar
  • 19
1 vote
1 answer
93 views

System.Net.Http.HttpClient returns error "ERR: Missing UA30"

The following code gives me the rather strange error ERR: Missing UA30 in the response content. I can't find the error anywhere on the Internet. It only happens to some particular websites. There is ...
kumkee's user avatar
  • 15
1 vote
0 answers
47 views

ASP.NET Core C# hosted on LInux cannot connect to the API

I am developing a website using asp.net core 7 and C#. This website retrieves data from the API using HttpClient and runs well on Windows OS. But when I hosted on Linux OS using Apache, I experienced ...
Amigo's user avatar
  • 21
0 votes
0 answers
43 views

C# HttpClient abort request after receiving the headers

My feed processing application is fetching third party json feeds in a regular interval and I want to decrease network and memory consumption by caching the last processed feed and skipping the ...
wavedeck's user avatar
0 votes
1 answer
33 views

meaning of PoolingHttpClientConnectionManager logs "total available"

I'm using PoolingHttpClientConnectionManager to configure how many concurrent requests I could send to servers, my code looks like private RestTemplate createRestTemplate(HttpHost proxy) throws ...
Harrison's user avatar
-1 votes
0 answers
61 views

How can I parse JSON from web site with c#

have a product page https://www.mvideo.ru/products/smart-chasy-apple-watch-series-8-45mm-silver-al-white-sport-s-m-30066231, in the element code you can find json with product information https://www....
Даниил Насибуллин's user avatar
1 vote
0 answers
44 views

Generate session_cookie from login API call

I'm writing some PHP to generate a login session cookie. It is supposed to hit the login POST API call and save the session cookie. /** * Generate a new runescape.com session token * @return ...
Kyle's user avatar
  • 23
0 votes
0 answers
12 views

How to know which connection is PoolingHttpClientConnectionManager closing?

I'm implementing a Java class that extends PoolingHttpClientConnectionManager and every time the methods closeExpiredConnections and closeIdleConnections are executed I need to know which connections ...
Tomas Sexenian's user avatar
0 votes
1 answer
61 views

'WebRequest.Create(string)' is obsolete:. Use HttpClient instead.'

hi i am migrating code from .net core to .net 6.0 and getting above mesprivate static HttpWebRequest CreateSoapRequest(string url, string action) { var httpWebRequest = (...
Pratex's user avatar
  • 65
0 votes
0 answers
11 views

why ProtocolSocketFactory not present in httpclient5?

I am trying to upgrade httpclient to httpclient5 distribution. But openSAML refers to ProtocolSocketFactory which is not present in httpclient5 version. I am using OpenSAML 2.6.6 Please let me know if ...
Rakesh Sharma's user avatar
0 votes
0 answers
17 views

ASP.NET Framework - How to resolve SocketException: An existing connection was forcibly closed by the remote host

In ASP.NET Framework 4.8, I am to consume a POST request using HttpClient. I get this error: System.AggregateException HResult=0x80131500 Message=One or more errors occurred. Source=mscorlib ...
Ayobamilaye's user avatar
  • 1,147
0 votes
0 answers
85 views

Timeout on blocking read for 5.000.000.000 NANOSECONDS

I have a problem connecting Java Spring to Python (Flask), my request is sent to python and starts being processed, however it takes about a minute, only after that it is sent back to Java. But after ...
Павлюченко Антон's user avatar
0 votes
0 answers
59 views

ASP.NET Framework - How to resolve System.Net.Http.HttpRequestException: An error occurred while sending the request

I have an old project in ASP.NET Framework-4.8, I am given this API to consume. It is a POST Request, with JSON Request and Response. I want to consume the API using HttpClient POST Request. URL: <...
Ayobamilaye's user avatar
  • 1,147
-1 votes
1 answer
73 views

How can i wait until the response is returned before returning in http request c#?

I want to wait for the response to be returned before returning the result: private static async Task<object> GetTestFuncAppAsync() { var result = string.Empty; using (...
Traci's user avatar
  • 73
-1 votes
2 answers
93 views

C# HTTPClient Response Logging

I have the below code which I am using to send JSON data to an API using HTTPClient. I want to log the HTTP response/status code such as 200, 201, 400 etc. Please can someone assist me with how to log ...
Beanymattd's user avatar
0 votes
0 answers
30 views

Angular Http request take more time than in postman

I have a rest web service and I try to call it in my angular application (using httpClient) but when I open the network console I find that the time my request take is higher than the time it takes to ...
Hanini Mohamed's user avatar
0 votes
0 answers
17 views

Connections ending up in close_wait state and load is not balanced properly

From service A , it calls a method is service B using Apache http client libraries postForEntity method and closeablehttpclient. A uses poolinghttpconnectionmanager also with values set for closed ...
Aswathy's user avatar
0 votes
1 answer
102 views

How in .net do I enable cookies with HttpClient to work with Cloudflare's 403 status code and "Please enable cookies."?

I've been using GetSling.com's API for several years, but recently they've been making several changes that is making life much more difficult. I am trying to login a user into the API using the C# ....
Russ Petersen's user avatar
0 votes
1 answer
33 views

HTTP Request to nasdaq RSS feed Works in Browser But Hangs with Code (C#, Node.js/Axios), Even with Identical Headers

I'm encountering a peculiar issue when trying to make an HTTP GET request to the URL 'https://www.nasdaq.com/feed/rssoutbound?category=FinTech'. When I manually enter this URL in my web browser, the ...
Teoman shipahi's user avatar
0 votes
0 answers
57 views

Migration from RestTemplate to Java default HttpClient

We've been using RestTemplate in our Spring Boot application in order to send rest requests to multiple dependencies. We use different timeouts for each dependencies and for this reason, we build a ...
Anil Altunkan's user avatar

1
2 3 4 5
141