carson-katri / swift-request

Declarative HTTP networking, designed for SwiftUI
MIT License
730 stars 41 forks source link

`buildIf` #7

Closed carson-katri closed 4 years ago

carson-katri commented 5 years ago

Build optional would allow the following to be possible:

Request {
    Url("https://example.com/data")
    if requiresAuth {
        Header.Authorization(.basic(username: "user1", password: "password123"))
    }
}
carson-katri commented 4 years ago

See #13