kean / Get

Web API client built using async/await
MIT License
943 stars 75 forks source link

Implementing upload using Data #50

Closed soemarko closed 2 years ago

soemarko commented 2 years ago

I was having issues when submitting a multipart/form-data. The only way I can get the server to accept the request is using URLSession.upload. I was already using Get since I generate the code with CreateAPI. and it seems very simple to implement this since upload from fileUrl is already there.

kean commented 2 years ago

Thanks! Yes, I think it should match the URLSession API.

P.S. Isn't this the same as using URLSessionDataTask with a request body?