Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70747

How to post FormData type object in ionic native HTTP

$
0
0

@Kanishk12 wrote:

Hi All

I’m trying to post a FormData type object, but it doesn’t seem to work for me. Below are some lines from my code, just see if you can suggest something in this approach:

let clientConfirmData = new FormData();
var blob = new Blob([this.signature], { type: ‘image/png’ });

clientConfirmData.append(“patientConfirmation”, blob);

this.http.post(url, clientConfirmData, headers)
.then(data =>{

                                    })
                                    .catch(error => {

                                    }));

so, my question is does clientConfirmData has to be a JSON object for it to work, won’t it work with FormData type object ? ( http is from ionic native’s not angular’s)

Thanks

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70747

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>