Simplify header item fetch using the Headers entries iterator.
commit67b4d55d913da194ef8995c901759fd862ecb5ff
authorKenneth Pouncey <kjpou@pt.lu>
Mon, 17 Jun 2019 09:50:38 +0000 (17 11:50 +0200)
committerLarry Ewing <lewing@microsoft.com>
Tue, 18 Jun 2019 02:56:47 +0000 (17 21:56 -0500)
treef99a099c199779d0df42f6ad84e5312572f691ab
parentf7bba7172e43b30bf143786a8774b8c835b31ecc
Simplify header item fetch using the Headers entries iterator.

- Use the Headers `entries{}` iterator object.
- This replaces the `foreach` delegate call where the object returned in the delegate was being disposed of too early.
- The foreach delegate takes three objects name, value, other.  The `other` being disposed was causing a problem when calling back into the delegate later.
- Removes the lamda expression called by the delegate without the worry of a memory leak if the finally is removed.
sdks/wasm/framework/src/WebAssembly.Net.Http/WasmHttpMessageHandler.cs