I am new to API. Can someone help me how to pass following request through HttpWebRequest and get response?
curl -F 'file=@/home/user/Documents/Invoice_Attachments_File.pdf'
https://api.fortnox.se/3/inbox\?path\=inbox_kf \
-H "Access-Token: accesstoken" \
-H "Client-Secret: secret"
I wonder how to pass arguments like :
curl -F 'file=@/home/user/Documents/Invoice_Attachments_File.pdf'
I have following so far but it does not work:
var httpWebRequest = (HttpWebRequest)WebRequest.Create("https://api.fortnox.se/3/inbox/");
httpWebRequest.ContentType = "application/xml";
httpWebRequest.Accept = "application/xml";
httpWebRequest.Method = "PUT";
httpWebRequest.Headers.Add("Authorization-Code", "accesstoken");
httpWebRequest.Headers.Add("Client-Secret", "secret");