in the end, it should look SOMETHING like this: (make sure you include okhttp and okhttputils from the add'l libraries panel)
Dim j As HttpJob
j.Initialize("", Me)
Dim fd As MultipartFileData
fd.Initialize
fd.KeyName = "file"
fd.Dir = File.DirInternal
fd.FileName = "file.jpg"
fd.ContentType = "image/jpg"
j.PostMultipart("https://api.remove.bg/v1.0/removebg -o no-bg.png", Null, fd)
j.GetRequest.SetHeader("X-API-Key", "YOUR_API_KEY")
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
Dim bitmap As Bitmap = j.GetBitmap
else
log("Uh oh!: " & lastexception.message)
End If
j.Release
there are a couple other ways to handle it, but i don't have an api key (don't want one, thanks), so i can't try it. but this is the general setup.
as you get errors, you report them (
NOT: "i got an error. help." we need to see exactly what the server says)