Comments (3)
Is your URI a SSL one or non SSL?
The only difference between the base class and the HttpClient is on threating the SSL elements:
- https://github.com/nanoframework/System.Net.Http/blob/e65c21ff083c9bc0a164667b2e7cf0046b55335d/nanoFramework.System.Net.Http/Http/HttpMessageInvoker.cs#L52
- https://github.com/nanoframework/System.Net.Http/blob/e65c21ff083c9bc0a164667b2e7cf0046b55335d/nanoFramework.System.Net.Http/Http/HttpClient.cs#L413
from home.
Is your URI a SSL one or non SSL?
Non-SSL, but it doesn't really matter
The only difference between the base class and the HttpClient is on threating the SSL elements
I'm talking about
- https://github.com/nanoframework/System.Net.Http/blob/e65c21ff083c9bc0a164667b2e7cf0046b55335d/nanoFramework.System.Net.Http/Http/HttpMessageInvoker.cs#L52 (which is the first one you linked) vs.
- https://github.com/nanoframework/System.Net.Http/blob/e65c21ff083c9bc0a164667b2e7cf0046b55335d/nanoFramework.System.Net.Http/Http/HttpClient.cs#L364
This method sets the request used and handles the BaseAddress, DefaultRequestHeaders, etc.
When just calling HttpClient.Send(HttpRequestMessage)
the base classes' method (HttpMessageInvoker.Send(HttpRequest)
) is called directly and the setup regarding BaseAddress, DefaultRequestHeaders isn't done. Also, because
SendWorker(HttpRequestMessage, HttpCompletionOption)
(the second method you linked) is never called either though, so Timeout, SSL, etc. is not set up either.
from home.
OK, I see, right. Now, the key question is what's the best way to fix this?
I think a simple override of Send
in the HttpClient
class calling the right function with a default on HttpCompletionOption.ResponseHeadersRead
.
As for the other issue, as it's community driven, super happy if you think it's a good idea to do this, then happy to review your PR :-)
from home.
Related Issues (20)
- NanoDeviceOperations.Dispose() breaks functionality of subsequent NanoDeviceOperations instantiations HOT 1
- Failing Unit Tests in nanoframework.System.Net.Http
- License Link missing HOT 1
- Failing build docker.all v2.45 HOT 3
- Build Project Error HOT 4
- `HostBuilder.Properties` and `HostBuilderContext.Properties` should be dictionaries not arrays HOT 4
- Wifi support disappeared after upgrade to ESP32-C3-REV3 1.9.1.52 HOT 3
- Modbus library does not work with RS232 HOT 14
- Add support for IL0373 epaper driver HOT 2
- ESP32 SDCard assumes that the card detect pin going low means a card is inserted HOT 6
- Modbus library will skip first byte received HOT 6
- Support ESP32_S3 Octal SPIRAM HOT 6
- ESP32 - nanoFramework.Json.DeserializationException HOT 12
- Serial port broken on XIAO ESP32C3 after upgrade from 1.9.1.7 HOT 2
- Error on ESP32S3 since nanoff updated to 2.5.66
- Problems with 96x16 OLED display
- Missing icons in Device Explorer HOT 1
- Double to string conversion problem HOT 5
- `DateTime.Parse` does not handle string that conform to RFC 3339 HOT 2
- I2cDevice is throwing an ArgumentException for busId=2 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from home.