Skip to content

Remove Alamofire Dependency #13

@maxhumber

Description

@maxhumber

It looks like Alamofire is just used here:

        return try await withCheckedThrowingContinuation { continuation in
            AF.request("https://queue.simpleanalyticscdn.com/events",
                       method: .post,
                       parameters: event,
                       encoder: JSONParameterEncoder.default).responseData { response in
                
                switch(response.result) {
                    case .success(_):
                        continuation.resume()
                    case let .failure(error):
                        continuation.resume(throwing: self.handleError(error: error))
                    }
            }
        }

I think it might be possible to just use vanilla URLSession async/await to do this post request....

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions