You need to sign in to do that
Don't have an account?
![ihssan taziny ihssan taziny](https://dfc-org-production.my.site.com/img/userprofile/default_profile_45_v2.png)
How to process a HttpResponse blob zip file
In my application, i am sending an HttpRequest to an external server to get a zip file, and once it's done i get the response as Blob, but i don't know how to process the Blob to extract some files from it.
This is the code:
This is the code:
HttpRequest request = new HttpRequest(); /* Here i set the Endpoint, body, and method attributes*/ Http http = new Http(); HttpResponse response = http.send(request); Blob file = response.getBodyAsBlob(); /*Here i should process the Blob (which is a zip file) to extract my files*/Help please.. !!
It's a work-arround: I create a StaticResource with the Metadata API of salesforce, but before i had to add a new Remote Site with the current instance of Salesforce. to be able to call the method of the API.
Then i create a PageReference Object with the content of the file name within the StaticResource zip file.
All Answers
Have a look below url
https://developer.salesforce.com/forums/?id=906F000000090sNIAQ
It's a work-arround: I create a StaticResource with the Metadata API of salesforce, but before i had to add a new Remote Site with the current instance of Salesforce. to be able to call the method of the API.
Then i create a PageReference Object with the content of the file name within the StaticResource zip file.