Is it possible to custom the body of an Apache cli...
# ktor
v
Is it possible to custom the body of an Apache client post ? I want to send a post request like in postman (form-data) where you can put a key like “photo” and a value with the file corresponding to the photo.
2
📝 1
d
So you want to create a multipart request from the client right? You can handle it at the server like this: https://ktor.io/servers/uploads.html Let me check the client
v
For the server, it’s ok I succeed to receive the photo and to save it
But After this I need to send this photo to another API. In postman, I create a request. In the body, I choose form-data, key “photo” and value the file. But since this morning, I didn’t succeed to do it with apache client in ktor
Yes that’s right
d
I don’t see any code related to multipart at the client. I guess you can craft the body by yourself and create a request with that body. I think there are utilities to build MultiPartData, let me check where they are
v
Ok thank you very much !
d
I’m going to gather more information and will provide you more info and update the docs.
👍 1