Skip to content

simple GET fails with HTTPClientError.cancelled #477

@mvolkmann

Description

@mvolkmann

I'm trying this package with a simple GET request to a local URL, but I get failure(HTTPClientError.cancelled).
Pasting the same URL in a web browser works.
I am sending the request from an init method in a ViewModel class. Should this work?

You can see my very basic code here:
https://github.com/mvolkmann/SwiftUI-AsyncHTTPClient/blob/main/SwiftUI-AsyncHTTPClient/ViewModel.swift

An instance of ViewModel is created in ContentView.swift which is here:
https://github.com/mvolkmann/SwiftUI-AsyncHTTPClient/blob/main/SwiftUI-AsyncHTTPClient/ContentView.swift

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions