You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
I'm trying to upload a file using Just but getting a 500 from my server which I want to debug. I'm able to see the status code and the request headers but not the http body. The description of the body shows there is content (from the debugger):
(lldb) po String(r.request!.httpBody!)
"3174935 bytes"
but the actual content won't print:
(lldb) po NSString(data: r.request!.httpBody!, encoding: String.Encoding.utf8.rawValue)
nil
Any thoughts on how to look at this? I'm basically trying to make sure the body is properly formed and the source code looks fine.
My code looks like this:
Just.post("...", files: [fileName: HTTPFile.url(localFileUrl, "image/png")]) { r in
if r.ok {
print(r.json)
} else {
print(r.statusCode)
print(r.request?.httpBody)
}
}
I'm trying to upload a file using Just but getting a 500 from my server which I want to debug. I'm able to see the status code and the request headers but not the http body. The description of the body shows there is content (from the debugger):
but the actual content won't print:
Any thoughts on how to look at this? I'm basically trying to make sure the body is properly formed and the source code looks fine.
My code looks like this:
where the localFileUrl is:
The text was updated successfully, but these errors were encountered: