RealHTTP icon indicating copy to clipboard operation
RealHTTP copied to clipboard

[Bug]: HTTPBody `asString` property always returns `nil`

Open NicFontana opened this issue 1 year ago • 0 comments

Platform Version

iOS 17.2

SDK Version

1.8.3

Xcode Version

Xcode 15.2

Steps To Reproduce

Let's suppose we do have a struct representing a form:

struct MyForm: Encodable {
    let numbers: [Int]
}

if we create a HTTPBody object by passing an instance of MyForm:

let form = try! HTTPBody.form(object: MyForm(numbers: [1, 2, 3]))

calling form.asString always returns nil.

Expected Behavior

form.asString should returns a String representing the MyForm instance we have passed.

Actual Incorrect Behavior

form.asString always returns nil.

NicFontana avatar Jan 30 '24 08:01 NicFontana