Home > Back-end >  Passing a local mutable struct into an async let binding
Passing a local mutable struct into an async let binding

Time:01-25

I want to create a URL request and pass it into an async let binding, which seems natural to me:

func test() async {
    // Force unwraps (!) are just for demo
    var request = URLRequest(url: URL(string:"https://stackoverflow.com")!)
    request.httpMethod = "GET" // just for example
    // some more tinkering with `request` here.
    
    //            
  •  Tags:  
  • Related