My REST web service should send the image file to the client. I got confused in two ways: send the image as a byte array or should I encode it as a base 64 string? What are the pros and cons of each? I may have to compress the image using gzip ... should it create a problem with any of the methods? I might even need to set my method as a SOAP service, which method should I use in this case?
Thank!
RESTful - HTTP. , "byte array" REST, HTTP GET URL REST . RESTful, . , base64 REST.
GET
SOAP, base64. XML, SOAP. MTOM, SOAP- , , base64.
, . , .
JSON XML ( + ), 64, , . , , .
GZip - (, tomcat - , gzip). - GZipFilter.
GZipFilter
Source: https://habr.com/ru/post/1789046/More articles:jQuery ajax not working in iOS - javascriptHow to find the number of database requests by application - javaHow to add an element to an array of strings in C? - cto curl and resize a remote image - phpSpecify XML path in dom4j - javaupdating mvcarray when moving marker - google-mapsBacking up a MySQL database and restoring it under a different name - sqlAjax page echo vs background Ajax / HTML direct manipulation? - javascriptUsing STR_to_DATE in PHP SQL Query - sqlChebyshev low-pass filter? - filterAll Articles