Swiftpack.co -  417-72KI/MultipartFormDataParser as Swift Package
Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
417-72KI/MultipartFormDataParser
Testing tool for `multipart/form-data`
.package(url: "https://github.com/417-72KI/MultipartFormDataParser.git", from: "1.1.1")

MultipartFormDataParser

Actions Status GitHub release Swift Package Manager Carthage Compatible GitHub license

Testing tool for multipart/form-data in Swift

Usage

example

let request: URLRequest = ...
do {
    let data = try MultipartFormData.parse(from: request)
    let genbaNeko = try XCTUnwrap(data.element(forName: "genbaNeko"))
    let denwaNeko = try XCTUnwrap(data.element(forName: "denwaNeko"))
    let message = try XCTUnwrap(data.element(forName: "message"))
    XCTAssertNotNil(Image(data: genbaNeko.data))
    XCTAssertEqual(genbaNeko.mimeType, "image/jpeg")
    XCTAssertNotNil(Image(data: denwaNeko.data))
    XCTAssertEqual(denwaNeko.mimeType, "image/jpeg")
    XCTAssertEqual(message.string, "Hello world!")
} catch {
    XCTFail(error.localizedDescription)
}

GitHub

link
Stars: 12
Last commit: 2 weeks ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Release Notes

1.1.1
47 weeks ago

Fixed

  • Fix Infinite Loop within extractData (#9) by @paulryanclark

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API