New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does RestKit support GZip? #511

Closed
haemi opened this Issue Jan 19, 2012 · 3 comments

Comments

Projects
None yet
3 participants
@haemi

haemi commented Jan 19, 2012

Hello,

I'm using the following line to configure RestKit:

[[RKClient sharedClient] setValue:@"gzip" forHTTPHeaderField:@"Accept-Encoding"];

Nevertheless I get the following HeaderFields back from the Server:

(gdb) po [[objectLoader response] allHeaderFields]
{
Connection = "Keep-Alive";
"Content-Type" = "application/json";
Date = "Thu, 19 Jan 2012 16:54:00 GMT";
"Keep-Alive" = "timeout=5, max=98";
Server = Apache;
"Transfer-Encoding" = Identity;
}

Does RestKit support GZip? If yes - what am I doing wrong?

Thanks a lot,

Stefan

@jamra

This comment has been minimized.

Show comment
Hide comment
@jamra

jamra Jan 23, 2012

I would also like to know how Restkit works with GZIP

jamra commented Jan 23, 2012

I would also like to know how Restkit works with GZIP

@blakewatters

This comment has been minimized.

Show comment
Hide comment
@blakewatters

blakewatters Jan 24, 2012

Member

RestKit is built on top of NSURLConnection, which provides transparent gzip/deflate support for response bodies. This should work with a server supporting gzip/deflate:

// Client level
[[RKClient sharedClient] setValue:@"gzip, deflate" forHTTPHeaderField:@"Accept-Encoding"];
Member

blakewatters commented Jan 24, 2012

RestKit is built on top of NSURLConnection, which provides transparent gzip/deflate support for response bodies. This should work with a server supporting gzip/deflate:

// Client level
[[RKClient sharedClient] setValue:@"gzip, deflate" forHTTPHeaderField:@"Accept-Encoding"];
@haemi

This comment has been minimized.

Show comment
Hide comment
@haemi

haemi Jan 30, 2012

added a Pull Request for this.

haemi commented Jan 30, 2012

added a Pull Request for this.

@haemi haemi closed this Jan 30, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment