I want to call external POST API from F# which has multipart form request body as below so how to do in F#?
External POST API url : “https://” Content-Type : Multipart/Form-data Body :- key(file) -> value(file which is browsed) key(secured) -> value(String)
Thanks for reading this question.
I tried the below code but didn't work for me
Http.Request ( "http://endpoint/for/multipart/data", body = Multipart( boundary = "define a custom boundary here", // this is used to separate the items you're streaming parts = [ MultipartItem("formFieldName", "file",IFormFile.OpenReadStream()) ] ))
Aucun commentaire:
Enregistrer un commentaire