11namespace SpacetimeDB ;
22
33using System ;
4- using System . Diagnostics . CodeAnalysis ;
54using System . Collections . Generic ;
5+ using System . Diagnostics . CodeAnalysis ;
66using System . IO ;
77using System . Linq ;
88using System . Text ;
@@ -272,7 +272,11 @@ public Result<HttpResponse, HttpError> Get(string uri, TimeSpan? timeout = null)
272272 /// }
273273 /// </code>
274274 /// </example>
275- [ SuppressMessage ( "Performance" , "CA1822" , Justification = "Public instance API exposed through ProcedureContext.Http." ) ]
275+ [ SuppressMessage (
276+ "Performance" ,
277+ "CA1822" ,
278+ Justification = "Public instance API exposed through ProcedureContext.Http."
279+ ) ]
276280 public Result < HttpResponse , HttpError > Send ( HttpRequest request )
277281 {
278282 // The host syscall expects BSATN-encoded spacetimedb_lib::http::Request bytes.
@@ -308,7 +312,10 @@ public Result<HttpResponse, HttpError> Send(HttpRequest request)
308312 var requestWire = new HttpRequestWire
309313 {
310314 Method = ToWireMethod ( request . Method ) ,
311- Headers = new HttpHeadersWire { Entries = [ .. request . Headers . Select ( ToWireHeader ) ] } ,
315+ Headers = new HttpHeadersWire
316+ {
317+ Entries = [ .. request . Headers . Select ( ToWireHeader ) ] ,
318+ } ,
312319 Timeout = timeout is null
313320 ? null
314321 : new HttpTimeoutWire { Timeout = ( TimeDuration ) timeout . Value } ,
@@ -422,7 +429,10 @@ internal static HttpRequest FromWire(HttpRequestWire requestWire, byte[] body) =
422429 {
423430 Uri = requestWire . Uri ,
424431 Method = FromWireMethod ( requestWire . Method ) ,
425- Headers = [ .. requestWire . Headers . Entries . Select ( h => new HttpHeader ( h . Name , h . Value , false ) ) ] ,
432+ Headers =
433+ [
434+ .. requestWire . Headers . Entries . Select ( h => new HttpHeader ( h . Name , h . Value , false ) ) ,
435+ ] ,
426436 Body = new HttpBody ( body ) ,
427437 Version = FromWireVersion ( requestWire . Version ) ,
428438 } ;
@@ -431,7 +441,10 @@ internal static (HttpResponseWire Response, byte[] Body) ToWire(HttpResponse res
431441 (
432442 new HttpResponseWire
433443 {
434- Headers = new HttpHeadersWire { Entries = [ .. response . Headers . Select ( ToWireHeader ) ] } ,
444+ Headers = new HttpHeadersWire
445+ {
446+ Entries = [ .. response . Headers . Select ( ToWireHeader ) ] ,
447+ } ,
435448 Version = ToWireVersion ( response . Version ) ,
436449 Code = response . StatusCode ,
437450 } ,
@@ -473,7 +486,9 @@ List<HttpHeader> headers
473486 {
474487 var version = FromWireVersion ( responseWire . Version ) ;
475488
476- var headers = responseWire . Headers . Entries . Select ( h => new HttpHeader ( h . Name , h . Value , false ) ) . ToList ( ) ;
489+ var headers = responseWire
490+ . Headers . Entries . Select ( h => new HttpHeader ( h . Name , h . Value , false ) )
491+ . ToList ( ) ;
477492
478493 return ( responseWire . Code , version , headers ) ;
479494 }
0 commit comments