Web API and Compression  Topic is solved

Discussions relating to the REST API of Jiwa 7.

Web API and Compression

Postby SBarnes » Tue Jan 30, 2018 2:16 pm

Hi Mike,

Does the API support compression such as gzip as I know that SearviceStack does, and is there anything special that needs to be done to enable it?

The reason for my question is that we have a client who wants a web cart developed but wants to house the database in house and have the web site call back to their office live and I am examining what might be the possible performance bottlenecks.
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175

Re: Web API and Compression  Topic is solved

Postby Mike.Sheen » Tue Jan 30, 2018 2:26 pm

Hi Stuart,

By default all our routes return compressed responses if the caller includes the Accept gzip or Accept deflate request header

Services can control if they support compression by decorating the service classes with the [CompressResponse] attribute.

If using a ServiceStack client you can also compress the request by setting the RequestCompressionType property of the JsonServiceClient to CompressionTypes.GZip or CompressionTypes.Deflate.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2445
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 757

Re: Web API and Compression

Postby SBarnes » Tue Jan 30, 2018 2:51 pm

Thanks for the quick response
Regards
Stuart Barnes
SBarnes
Shihan
Shihan
 
Posts: 1620
Joined: Fri Aug 15, 2008 3:27 pm
Topics Solved: 175


Return to REST API

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron