-
Unfortunately, in my client for Http requests (Ktor) I can't pass anything other than String. To summarize: I need to make a POST with this FormData {
"number": "123123",
"close time": "string",
"close location": "string",
"open time": "string",
"open location": "string",
"attachments": [{"url":"https://nocohub-001-prod-app-attachments.s3.us-east-2.amazonaws.com/nc/uploads/2023/10/21/08bca39258b20ad3e4300f2a76169d3fb02c5249/HPM8jgzGzuJqLDDbbk.png","title":"ktor_logo.png","mimetype":"image/jpeg","size":30207,"signedUrl":"https://nocohub-001-prod-app-attachments.s3.us-east-2.amazonaws.com/nc/uploads/2023/10/21/08bca39258b20ad3e4300f2a76169d3fb02c5249/HPM8jgzGzuJqLDDbbk.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIATUJCOBWTKOMQ5JMU%2F20231021%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Date=20231021T104627Z&X-Amz-Expires=7413&X-Amz-Signature=f11c2918fd2e2c49caab3d405f794650dbad75dd5abcb52476bda3afdc56c96f&X-Amz-SignedHeaders=host&x-id=GetObject"}]
} But I can't do that because attachments is an array. Related: https://stackoverflow.com/questions/77335786/how-to-pass-to-formdata-not-a-string-ktor |
Beta Was this translation helpful? Give feedback.
Answered by
tusxxx
Oct 21, 2023
Replies: 1 comment
-
KotlinX serialization helped. Watch stack overflow |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
tusxxx
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
KotlinX serialization helped. Watch stack overflow