Hey guys, does anyone have an example on how to se...
# ktor
s
Hey guys, does anyone have an example on how to send a Post request to an url with a File parameter? I’ve tried with submitFormWithBinaryData. When a File is detected it gets the inputStream.asInput(). However the response that I’m getting is not what’s expected.. any ideas?
g
Maybe your server expects multipart/form-data, not raw binary
s
I’ve also used the call(url) method where in the request builder I had body = MultiPartFormDataContent(formData { …. and it still didnt work
i created a stackoverflow question if you want to check the code
g
but 401 means that your request is not authorized
s
its authentication via the image that’s is why that error is returned 🙂
the request only requires the photo key and a image type png or jpg