Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7620983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:04:56+00:00 2026-05-31T04:04:56+00:00

I am using the Google Geocoding API v3[1] from an iOS application but can’t

  • 0

I am using the Google Geocoding API v3[1] from an iOS application but can’t get it to return a gzip response. The v2 was much more lightweight but with v3 I’m getting a ~20kb JSON response .. which might take some time to retrieve on a bad GPRS connection, so I would really like to get a gzipped result back.

Am I wondering if I’m doing anything wrong in my call or if their API really doesn’t support gzip or deflate. It just sounds strange to me.

This is a what I’m doing in my code:

NSURL *url = [NSURL URLWithString:@"http://maps.googleapis.com/maps/api/geocode/json?latlng=55,12&sensor=true"];

NSMutableURLRequest *req = [[NSMutableURLRequest alloc] initWithURL:url];
[req setValue:@"gzip,deflate" forHTTPHeaderField:@"Accept-Encoding"];

NSURLConnection *c = [[NSURLConnection alloc] 
  initWithRequest:req delegate:self startImmediately:YES];

I’ve tried with only “gzip” and “deflate” too. Same result.

[1] http://code.google.com/apis/maps/documentation/geocoding/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:04:58+00:00Added an answer on May 31, 2026 at 4:04 am

    I have no idea why, but it seems to have something to do with the User-Agent header. When I request the API page with Firefox (Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0.2) Gecko/20100101 Firefox/10.0.2) I get a gzipped response. When I request the page with cURL (specifically asking for a compressed response), I get a plain response. However, if I override cURL’s default agent to the Mozilla one, I do get a compressed response.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to get a json response from google's geocoding service. I'm using
I am using http://code.google.com/apis/maps/documentation/geocoding/ api from google to get geolocation based on address. I
I am trying to parse out some information from Google's geocoding API but I
I am currently using the google maps' reverse geocoding API to convert long/lat received
I am working with viewports and bounds returned from Google Geocoding API . When
I'm doing some geocoding using the google maps API. The user fill a form
I am trying to do some basic geocoding using the google maps API and
We are using the Google Maps API method getLocations() for geocoding addresses the user
I am using google maps Api V3 and using reverse geocoding to find the
Possible Duplicate: Reverse Geocoding With Google Map API And PHP To Get Nearest Location

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.