HI there
I have a problem related to 308 Permanent redirect - status code in my app. I want to upload a file to CrossEngage platform and everything is alright when using a POSTMAN but when I do the same using HttpWebRequest or RestClient on my application I’m getting 308 Permanent redirect - What I’m not doing that POSTMAN is doing ?
My code:
byte dataBytes = System.IO.File.ReadAllBytes(path);
string converted = Convert.ToBase64String(dataBytes);
var client = new RestClient(Url+Action);
client.FollowRedirects = true;
var request = new RestRequest(Method.GET);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("x-xng-authtoken", AuthToken);
request.AddHeader("x-xng-apiversion", "2");
request.AddHeader("content-type", "application/pdf");
request.AddParameter("application/pdf", converted, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Thanks in advance
Kriss