Send local file to rest api upload endpoint

hversemann

Member
Joined
Jul 29, 2016
Messages
11
Location
midwest
Programming Experience
3-5
I'm trying to send a local file to an upload endpoint of an external rest api. I've never done this before, so how do I send a local file (what kind of format) to the endpoint? Just as a file path to the local file, a string or some other way? The local file is a .csv / Excel file, how do I set the content-type for that? I'm only supposed to get back the status code from the upload request, so do I need to set an "Accept" header on the request or not? If so then what value should I set it to?

I'm currently trying to send the request using an "HttpWebRequest".


Thanks.

Henry
 
Back
Top Bottom