From 5b70857c9943e151a2647e3b88a23d16e0abd0e1 Mon Sep 17 00:00:00 2001 From: Klaus Vancamelbeke Date: Mon, 7 Mar 2022 10:28:15 +0100 Subject: [PATCH 1/3] HttpResponseMessage.StatusCode fixed The HttpResponseMessage.StatusCode was not exposed through it's backing field. Signed-off-by: Klaus Vancamelbeke (klaus@proles.be) --- nanoFramework.System.Net.Http/Http/HttpResponseMessage.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nanoFramework.System.Net.Http/Http/HttpResponseMessage.cs b/nanoFramework.System.Net.Http/Http/HttpResponseMessage.cs index 003b02c7..dd6b621f 100644 --- a/nanoFramework.System.Net.Http/Http/HttpResponseMessage.cs +++ b/nanoFramework.System.Net.Http/Http/HttpResponseMessage.cs @@ -88,7 +88,7 @@ public HttpRequestMessage RequestMessage /// Gets or sets the status code of the HTTP response. /// /// The status code of the HTTP response. - public HttpStatusCode StatusCode { get; } + public HttpStatusCode StatusCode => _statusCode; /// /// Gets or sets the HTTP message version. From 223b009df694a0b10281d120bcd183f9344fcdde Mon Sep 17 00:00:00 2001 From: Klaus Vancamelbeke Date: Mon, 7 Mar 2022 10:47:28 +0100 Subject: [PATCH 2/3] Proxying to IIS Express explained in Readme.md Explained about using a proxy to let a MCU connect to a development machine running IIS Express. Also warned about SocketExceptions that occur but can be countered with a retry mechanism. Signed-off-by: Klaus Vancamelbeke (klaus@proles.be) --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 29378ef9..fe003c0a 100644 --- a/README.md +++ b/README.md @@ -123,6 +123,14 @@ using FileStream fs = new FileStream($"I:\\i-am-a-binary-file.bin", FileMode.Cre response.Content.ReadAsStream().CopyTo(fs); ``` +### Debugging through a reverse proxy + +When code is deployed to a MCU it might be desirable to let the device connect to your development machine running IIS Express. +This can be achieved with a proxy such as [this one](https://www.npmjs.com/package/iisexpress-proxy). +Be aware that this leads to SocketExceptions with the current version of **nanoFramework** System.Net.Http when sending consecutive +requests to your development machine. A simple retry mechanism in Debug mode will get around this. + + ## Feedback and documentation For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home). From 79decb370b400d3c8bcead9e71ddc37335027564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Sim=C3=B5es?= Date: Tue, 8 Mar 2022 07:43:25 +0000 Subject: [PATCH 3/3] Update README.md - Remove extra line. --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index fe003c0a..547edd90 100644 --- a/README.md +++ b/README.md @@ -130,7 +130,6 @@ This can be achieved with a proxy such as [this one](https://www.npmjs.com/packa Be aware that this leads to SocketExceptions with the current version of **nanoFramework** System.Net.Http when sending consecutive requests to your development machine. A simple retry mechanism in Debug mode will get around this. - ## Feedback and documentation For documentation, providing feedback, issues and finding out how to contribute please refer to the [Home repo](https://github.com/nanoframework/Home).