REST API - How to POST File

I was wondering if anyone could provide input on how to POST a file using REST API. I was having difficulties and am not sure how to proceed.

RequestObject request = (RequestObject) findTestObject(‘DataImport/postCreationImport’)
request.httpHeaderProperties.add(new TestObjectProperty(‘Authorization’, ConditionType.EQUALS, 'bearer ’ + GlobalVariable.token))
request.httpHeaderProperties.add(new TestObjectProperty(‘Content-Type’, ConditionType.EQUALS, “multipart/form-data”))
request.getRestParameters().add(new TestObjectProperty(‘dryRun’, ConditionType.EQUALS, dryRun.toString()))
request.getRestParameters().add(new TestObjectProperty(‘usingExternalRefIds’, ConditionType.EQUALS, usingExternalRefIds.toString()))
request.setBodyContent(new HttpFormDataBodyContent([new FormDataBodyParameter(‘file’, filepath, ‘File’)]))

filepath is the path to a .xslx file.

It seems like the data that I get returned has an empty postData field