Salesforce SDK no longer working after May 10 refresh - status 302
完了Hi: After getting a developer token, we have been connecting to box to download audio files in to Salesforce. The following piece of code stopped working after May 10 upgrade. I was told to look for lower-case headers in the response. But still no luck. Can you help? Here is my sample code.
string endPointUrl ='https://api.box.com/2.0/files/'+fileId+'/content';
Http h1 =newHttp();
Httprequest req1 =newHttpRequest();
req1.setEndpoint(endPointUrl);
req1.setMethod('GET');
req1.setHeader('connection','keep-alive');
req1.setHeader('authorization', 'Bearer '+accessToken);
req1.setHeader('content-Type','audio/mpeg');
try {
String fileLocation, extFileURL;
blob fileBlob;
HttpResponse response =newHttpResponse();
if(!Test.isRunningTest()){
response=h1.send(req1);
fileLocation=response.getHeader('location'); // I donot get the header back, get status 302
System.debug('File Loction '+fileLocation);
}
サインインしてコメントを残してください。
コメント
1件のコメント