I managed to get a successful response. However, I'm not sure it's "clean" enough to work in all cases. For those who are interested, here is the code to make the request to IPFS HTTP API multibase/encode:
func _on_send_pressed()->void:
var df:File = File.new();
df.open("res://ipfs_http_api_test.txt",File.READ);
var ftxt = df.get_as_text();
df.close();
var headers:Array = [
"Content-Type: multipart/form-data; boundary=\"BodyPart35674573458\""
];
var body;
body = "\r\n--BodyPart35674573458\r\n"
body += "Content-Disposition: form-data; name=\"file\"; filename=\"ipfs_http_api_test.txt\"\r\n";
body += "Content-Type: application/json\r\n\r\n";
body += JSON.print(ftxt);
body += "\r\n--BodyPart35674573458\r\n";
httpreq.request("http://127.0.0.1:5001/api/v0/multibase/encode",headers,false,HTTPClient.METHOD_POST,body);