Closed samuelbles07 closed 4 years ago
Ah, so the issue seems to be that Body
refers to the associatedtype Body
included with all SwiftUI views. A workaround is to declare a typealias
at the root of the project:
import Request
typealias RequestBody = Body
Then instead of using Body
in your request, you can use:
Request {
...
RequestBody(Json([...]))
}
You should only have to use this workaround if you're calling using Request from inside a SwiftUI View.
I'm closing this due to inactivity
I followed the example in Readme but it always show error
Type 'TestTest.Body' (aka 'some View') has no member 'init'
.XCode 11.4.1 IOS 13.4
Test Code