Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Daedren
on Jan 16, 2022
|
parent
|
context
|
favorite
| on:
Cheezam – Shazam for Cheese
It's very misleading that the author decided to use external libraries on the other examples, yet used the built-in URLSession on Swift.
yen223
on Jan 17, 2022
|
next
[–]
My swift is pretty rusty now, but I'm fairly sure you don't need to construct an http request by hand (which is what the example code is doing), even if you're limited to only using Foundation classes
Daedren
on Jan 18, 2022
|
parent
|
next
[–]
The issue is the multipart/form-data body. You still need to build it by hand in current Swift.
stickfigure
on Jan 16, 2022
|
prev
[–]
The JS fetch example is native, no library. But point taken - what does a Swift file upload request look like with a (common) library?
Daedren
on Jan 16, 2022
|
parent
[–]
You can find an example using Alamofire, the most commonly used network framework, here.
https://github.com/Alamofire/Alamofire/blob/master/Documenta...
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: