Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

REST service and big files

Can REST web service (which usually produces e.g. simple JSONs) both handle and return big binary input/output data?

I mean, to call a REST service by a HTTP POST providing big file and afterwards reading the big result back? Is REST ok for that? ("Big" = few megabytes)

like image 659
Cartesius00 Avatar asked Feb 21 '23 17:02

Cartesius00


1 Answers

With text serializers such as JSON and XML you would get about 33% increase of the size of the files over the wire as the binary data needs to be Base64 encoded. There are more optimized protocols such as MTOM to handle this scenario. WCF supports MTOM out of the box.

like image 185
Darin Dimitrov Avatar answered Feb 26 '23 20:02

Darin Dimitrov