Issues

ZF2-348: Zend\Http\Client returns stripped results

Issue Type: Bug Created: 2012-06-08T08:09:47.000+0000 Last Updated: 2012-06-08T14:50:56.000+0000 Status: Resolved Fix version(s): Reporter: Pavel Kostenko (poul) Assignee: Maks 3w (maks3w) Tags: - Zend\Http

  • Zend_Http_Client

Related issues: Attachments:

Description

<pre class="highlight">
use Zend\Http\Request as HttpRequest,
    Zend\Http\Response as HttpResponse,
    Zend\Http\Client as HttpClient;

class SomeClass
{
    public function testSearchVenues()
    {
        $request = new HttpRequest();
        $request->setUri('<a href="https://api.foursquare.com/v2/venues/search">https://api.foursquare.com/v2/venues/search</a>');

        $request->query()->oauth_token = '1EBYWQOEG0EE3UMLQPJFPMATWUTJ0JRSORVWYAQ0IQUTW55V';
        $request->query()->v = '20120608';
        $request->query()->ll = '44.3,37.2';

        $httpClient = new HttpClient();
        $httpClient->setRequest($request);
        $response = $httpClient->send();
        echo $response->getBody();
    }
}

Outputs (stripped result set):

<pre class="highlight">
{"meta":{"code":200},"notifications":[{"type":"notificationTray","item":{"unreadCount":0],"response":{"venues":[{"id":"4e90699293adc15b620c2632","name":"{name}","contact":{},"location":{"address":"

Debug output: ($response->toString() outputs this)

<pre class="highlight">
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Cache-Control: no-cache, private, no-store
Content-Encoding: gzip
Content-Type: application/json; charset=utf-8
Date: Fri, 08 Jun 2012 08:09:00 GMT
Expires: Fri, 8 Jun 2012 08:09:00 GMT
Pragma: no-cache
Server: nginx/1.1.17
X-RateLimit-Limit: 500
X-RateLimit-Remaining: 461
Content-Length: 1915
Connection: Close

[OHW,r~4{R²ݠ
ZcHv@W홉=Da vOU_vHwUwz͋&5MZ䵻kY81k%Mm^E7wss6q+KݷjAxT0z\VEHRqiY\)GPZUi]fP5Bsț]efXqUQӦ@[$|2sw;tndp
OŝRq8/y»GVV櫶SPp^TiO[\j52a)ՂFM@]y2'n[C&I EmݹMmf]*Қ%!Tu    *nδXZOLpqn7kw$H0TQ\P"dBIzu%\:%JvJ]#-"

h.ű
'l˼͚"w
Jw[韫eu7Eu0[
0O#"niD@X#=N*geW\&\^ܩ:u2Z3܃V.2Q,QHE;0ޝVZ;6~uy$HNBwX&Eʬdv$~HX@F--VV`?IӔlwk
vT1nO=HzHDUIN8|EgmS"o"n*KҦj{Srx3cA$0$$~caygp~nnzDs^<~_toNxB|T)e8^zB^¨M><&b_4DΥOW)1>&"e"j (<_,Kl6ߛ_# t/~)gt5sr0[1
   >ʄLH
~JFnԐX|>|SCˑI|F
p  8^ *3{>ja:-A^mp#S],saY8]g
ƙM$uRvBcY}+lᕇģfP [^oLn0̝4-"V+c!WՁR/Xh bnX B<
FA Wd׶a+`0BvƀP$38zȾP'ΉIJyur_I490
:żϙvN1@ccC4:$b    $\(V:4l,UtķiC?&1jQ˅? x=Tp?Y;-
\;i3;?u4:?"-. v2Tb'|-a'a5yWJ|{j!;'kb

``Browser outputs: URL (this URL is constructed by above code): https://api.foursquare.com/v2/venues/…

<pre class="highlight">
{"meta":{"code":200},"notifications":[{"type":"notificationTray","item":{"unreadCount":0],"response":{"venues":[{"id":"42377700f964a52024201fe3","name":"Brooklyn Heights Promenade","contact":{},"location":{"address":"Columbia Heights","crossStreet":"btwn Remsen & Orange","lat":40.69829137715981,"lng":-73.99663209915161,"distance":342,"postalCode":"11201","city":"Brooklyn","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d163941735","name":"Park","pluralName":"Parks","shortName":"Park","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/parks_outdoors\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":9591,"usersCount":4501,"tipCount":60},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"430d0a00f964a5203e271fe3","name":"Brooklyn Bridge Park","contact":{"phone":"2128033822","formattedPhone":"(212) 803-3822","twitter":"bbpconservancy"},"location":{"address":"Main St.","crossStreet":"Plymouth St.","lat":40.701593743002,"lng":-73.99592399597168,"distance":387,"postalCode":"11201","city":"Brooklyn","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d163941735","name":"Park","pluralName":"Parks","shortName":"Park","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/parks_outdoors\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":true,"stats":{"checkinsCount":10475,"usersCount":6556,"tipCount":73},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4dbd86d243a1d8504ba74df3","name":"Five Boro Bike - Con Ed Rest Stop","contact":{},"location":{"lat":40.69745380465409,"lng":-73.99801308382229,"distance":329,"state":"NY","country":"United States"},"categories":[{"id":"4d4b7105d754a06377d81259","name":"Great Outdoors","pluralName":"Great Outdoors","shortName":"Parks & Outdoors","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/parks_outdoors\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":52,"usersCount":52,"tipCount":1},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4e15d1348877cd5712112a44","name":"The Arena","contact":{},"location":{"address":"110 Wall Street","lat":40.70148822526266,"lng":-74.00108900070211,"distance":189,"city":"New York","state":"New York","country":"United States"},"categories":[{"id":"4bf58dd8d48988d1e4941735","name":"Campground","pluralName":"Campgrounds","shortName":"Campground","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/parks_outdoors\/campground_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":60,"usersCount":17,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4fa7fa1ae4b089a95c20b508","name":"EmblemHealth Fitness Center","contact":{},"location":{"lat":40.701604842269646,"lng":-74.00157678148989,"distance":222,"postalCode":"10004","city":"New York","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d176941735","name":"Gym","pluralName":"Gyms","shortName":"Gym","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/building\/gym_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":8,"usersCount":2,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4dcc605afa76e2535b237f50","name":"Celebrate Brooklyn","contact":{},"location":{"address":"Pier 1","lat":40.70181927468727,"lng":-73.99731296151289,"distance":304,"city":"Brooklyn","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d1e5931735","name":"Music Venue","pluralName":"Music Venues","shortName":"Music Venue","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/arts_entertainment\/musicvenue_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":60,"usersCount":52,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4ebac60a0cd6904066e4108f","name":"Brookyn Bridge Park Greenway","contact":{},"location":{"address":"Fulton Ferry Landing to Atlantic Ave.","lat":40.70025980212479,"lng":-73.99698615074158,"distance":255,"postalCode":"11201","city":"Brooklyn","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d163941735","name":"Park","pluralName":"Parks","shortName":"Park","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/parks_outdoors\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":99,"usersCount":60,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4c704f0334443704e4cc235f","name":"Spiral Pool","contact":{},"location":{"lat":40.69911312557534,"lng":-73.99703750285386,"distance":268,"postalCode":"11201","city":"Brooklyn","state":"New York","country":"United States"},"categories":[{"id":"4bf58dd8d48988d165941735","name":"Scenic Lookout","pluralName":"Scenic Lookouts","shortName":"Scenic Lookout","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/parks_outdoors\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":39,"usersCount":21,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4c3a5ad83849c92880e0c2b1","name":"Blue Marble Ice Cream","contact":{},"location":{"address":"Brooklyn Bridge Park - Pier 1","lat":40.70136599888968,"lng":-73.99794101715088,"distance":230,"postalCode":"11201","city":"Brooklyn","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d1c9941735","name":"Ice Cream Shop","pluralName":"Ice Cream Shops","shortName":"Ice Cream","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/food\/icecream_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":76,"usersCount":67,"tipCount":4},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4f8a62ebe4b09582a33c2cbd","name":"8 Clark Street","contact":{},"location":{"address":"8 Clark St, Brooklyn, NY 11201","lat":40.69815602774352,"lng":-73.99598157432625,"distance":396,"postalCode":"11201","city":"Brooklyn","state":"New York","country":"United States"},"categories":[{"id":"4d954b06a243a5684965b473","name":"Residential Building (Apartment\/Condo)","pluralName":"Residential Buildings (Apartments\/Condos)","shortName":"Apartment Building","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/building\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":35,"usersCount":9,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4f7b7b18e4b043bd2ab966f7","name":"Salud Restaurant","contact":{},"location":{"address":"Beekman Place","lat":40.70168134440025,"lng":-73.99964286682906,"distance":189,"postalCode":"10022","city":"New York City","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d1be941735","name":"Latin American Restaurant","pluralName":"Latin American Restaurants","shortName":"Latin American","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/food\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":3,"usersCount":3,"tipCount":1},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4a9acb4bf964a520c13220e3","name":"Fruit Street Sitting Area","contact":{},"location":{"address":"Columbia Heights","crossStreet":"Cranberry St.","lat":40.70071529713512,"lng":-73.99523735046387,"distance":409,"city":"New York","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d165941735","name":"Scenic Lookout","pluralName":"Scenic Lookouts","shortName":"Scenic Lookout","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/parks_outdoors\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":true,"stats":{"checkinsCount":314,"usersCount":168,"tipCount":3},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4f22ee6ee4b03bdcfb3d2ba6","name":"Yips","contact":{},"location":{"lat":40.70043453867425,"lng":-74.00178910920933,"distance":158,"country":"United States"},"categories":[{"id":"4bf58dd8d48988d145941735","name":"Chinese Restaurant","pluralName":"Chinese Restaurants","shortName":"Chinese","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/food\/chinese_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":2,"usersCount":2,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4f0daebfe4b01660dcc0ecc2","name":"Morgan stanley","contact":{},"location":{"address":"111 Wall St, Manhattan, NY 10043","lat":40.69994125694707,"lng":-74.00130706756083,"distance":110,"postalCode":"10043","city":"New York","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d174941735","name":"Coworking Space","pluralName":"Coworking Spaces","shortName":"Coworking Space","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/building\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":5,"usersCount":1,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4edf95ab8231abf7c269aa8e","name":"Trans-Fast Remittance LLC","contact":{"phone":"2123822828","formattedPhone":"(212) 382-2828"},"location":{"address":"110 Wall St, New York, NY 10005","lat":40.70206149009705,"lng":-74.0014842018679,"distance":261,"postalCode":"10005","city":"New York","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d10a951735","name":"Bank","pluralName":"Banks","shortName":"Bank \/ Financial","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/shops\/financial_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":4,"usersCount":3,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4a882e27f964a520590520e3","name":"Harry Chapin Playground","contact":{},"location":{"address":"Middagh & Columbia Heights","lat":40.700682,"lng":-73.994859,"distance":440,"city":"New York","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d1e7941735","name":"Playground","pluralName":"Playgrounds","shortName":"Playground","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/parks_outdoors\/playground_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":true,"stats":{"checkinsCount":225,"usersCount":118,"tipCount":2},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4e2ee1ff483b93c2f2d97eb0","name":"BGC Partners","contact":{},"location":{"lat":40.70266296308047,"lng":-74.00172199466637,"distance":330,"state":"NY","country":"United States"},"categories":[{"id":"4d4b7105d754a06375d81259","name":"Professional & Other Places","pluralName":"Professional & Other Places","shortName":"Professional & Other Places","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/building\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":23,"usersCount":8,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4c2fbe00ed37a59340d86703","name":"Fort Stirling Park","contact":{},"location":{"address":"Columbia Heights","crossStreet":"Clark St","lat":40.69841734574097,"lng":-73.99583810532737,"distance":392,"city":"Brooklyn","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d163941735","name":"Park","pluralName":"Parks","shortName":"Park","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/parks_outdoors\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":true,"stats":{"checkinsCount":92,"usersCount":27,"tipCount":1},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4e33f3a37d8b6946c1f3d510","name":"Brooklyn Bridge Swim","contact":{},"location":{"address":"Brooklyn Bridge Park","lat":40.7019830565045,"lng":-73.99606554255092,"distance":398,"postalCode":"11201","city":"Brooklyn","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d1e2941735","name":"Beach","pluralName":"Beaches","shortName":"Beach","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/parks_outdoors\/beach_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":237,"usersCount":200,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4d6d118e1dfca35d14ea42e0","name":"AHRC- New York City","contact":{},"location":{"address":"83","lat":40.700182029302574,"lng":-74.0049797352277,"distance":420,"postalCode":"10038","city":"New York","state":"New York","country":"United States"},"categories":[{"id":"4bf58dd8d48988d124941735","name":"Office","pluralName":"Offices","shortName":"Corporate \/ Office","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/building\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":29,"usersCount":8,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"hereNow":{"count":0,"groups":[],{"id":"4c59a029f346c92803034dca","name":"Mobotix","contact":{},"location":{"address":"110 wall st","crossStreet":"Fulton","lat":40.702672,"lng":-73.997589,"distance":360,"city":"New York","state":"New York","country":"United States"},"categories":[],"verified":false,"stats":{"checkinsCount":6,"usersCount":1,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4b7c8bedf964a5202c9a2fe3","name":"160 Columbia Heights","contact":{},"location":{"address":"160 Columbia Heights","lat":40.698449,"lng":-73.996528,"distance":340,"city":"Brooklyn","state":"NY","country":"United States"},"categories":[],"verified":false,"stats":{"checkinsCount":107,"usersCount":20,"tipCount":1},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4f8cb450e4b09ac7a7540353","name":"24 Hour Picnic People","contact":{},"location":{"lat":40.70179491754677,"lng":-73.99722114200387,"distance":308,"postalCode":"10004","city":"New York","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d163941735","name":"Park","pluralName":"Parks","shortName":"Park","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/parks_outdoors\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":11,"usersCount":7,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4fa5c71ce4b01acec43582cf","name":"Cinco De Mayo Booze Cruise Nyc","contact":{},"location":{"lat":40.70279430008063,"lng":-74.00181206354327,"distance":346,"country":"United States"},"categories":[{"id":"4bf58dd8d48988d11f941735","name":"Nightclub","pluralName":"Nightclubs","shortName":"Nightclub","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/nightlife\/danceparty_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":4,"usersCount":4,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4d3f922e89616dcb96cafbb4","name":"Willow street","contact":{},"location":{"lat":40.697818,"lng":-73.995348,"distance":461,"country":"United States"},"categories":[],"verified":false,"stats":{"checkinsCount":89,"usersCount":17,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4fc62feee4b0bf27803674ed","name":"VonChurch","contact":{"twitter":"vonchurch"},"location":{"address":"198 Columbia Heights, Suite 4","crossStreet":"btwn Pierrepont & Clark Street","lat":40.69723129272461,"lng":-73.99697875976562,"distance":400,"postalCode":"11201","city":"Brooklyn","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d125941735","name":"Tech Startup","pluralName":"Tech Startups","shortName":"Tech Startup","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/shops\/technology_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":6,"usersCount":1,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"hereNow":{"count":0,"groups":[],{"id":"4f4d693ee4b0acb467882485","name":"Jcca","contact":{},"location":{"lat":40.701816,"lng":-74.000053,"distance":202,"country":"United States"},"categories":[{"id":"4bf58dd8d48988d124941735","name":"Office","pluralName":"Offices","shortName":"Corporate \/ Office","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/building\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":2,"usersCount":1,"tipCount":1},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"hereNow":{"count":0,"groups":[],{"id":"4e7d315ef5b924f463ec9b57","name":"Tough Mudder Toughy's","contact":{},"location":{"lat":40.70233328729731,"lng":-73.99767450040193,"distance":325,"country":"United States"},"categories":[{"id":"4bf58dd8d48988d12d951735","name":"Boat or Ferry","pluralName":"Boats or Ferries","shortName":"Boat \/ Ferry","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/travel\/boat_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":2,"usersCount":2,"tipCount":1},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"hereNow":{"count":0,"groups":[],{"id":"4fa66aaee4b0cfe54da25154","name":"113 Columbia Hts. Best Stoop Sale EVER!","contact":{},"location":{"lat":40.69927104734531,"lng":-73.99617095324031,"distance":333,"postalCode":"11201","city":"Brooklyn","state":"NY","country":"United States"},"categories":[{"id":"4bf58dd8d48988d1f7941735","name":"Flea Market","pluralName":"Flea Markets","shortName":"Flea Market","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/shops\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":false,"stats":{"checkinsCount":1,"usersCount":1,"tipCount":0},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[],{"id":"4c7b0c5297028cfa5c37e0fe","name":"Squibb Park","contact":{},"location":{"address":"20-98 Columbia Heights","lat":40.70096,"lng":-73.99511396884918,"distance":425,"postalCode":"11201","city":"Brooklyn","state":"New York","country":"United States"},"categories":[{"id":"4bf58dd8d48988d163941735","name":"Park","pluralName":"Parks","shortName":"Park","icon":{"prefix":"https:\/\/foursquare.com\/img\/categories\/parks_outdoors\/default_","sizes":[32,44,64,88,256],"name":".png"},"primary":true}],"verified":true,"stats":{"checkinsCount":48,"usersCount":46,"tipCount":1},"likes":{"count":0,"groups":[]},"beenHere":{"count":0},"specials":{"count":0,"items":[]},"hereNow":{"count":0,"groups":[]]

Comments

Posted by Maks 3w (maks3w) on 2012-06-08T12:32:42.000+0000

Two things:

The first: Please revoke the OAuth token ASAP ;-)

Second: I tested your code and I don't have any problem. Are you using some Proxy? if not test your network connection.

Regards.

Posted by Pavel Kostenko (poul) on 2012-06-08T12:50:04.000+0000

On my localhost I have a transparent proxy between my local development server and foursquare API server. But I did tests on remote VPS, results are the same (http://subwaytrips.wallpapers.kg/foursquare/…)

Posted by Maks 3w (maks3w) on 2012-06-08T13:25:20.000+0000

Despite that the output is compressed with gzip and for this reasons there are some non-printable bytes.

https://gist.github.com/2895577

I tested your code in local with the ZF2 master. What version are you using?

Posted by Pavel Kostenko (poul) on 2012-06-08T13:41:18.000+0000

PHP 5.3.9-ZS5.6.0 (cli) (built: Feb 23 2012 11:12:13)

Zend Framework 2.0.0beta4

I set up my project yesterday using comands below: git clone git://github.com/zendframework/… cd ZendSkeletonApplication php composer.phar install

Should I update ZF2 ?

Posted by Pavel Kostenko (poul) on 2012-06-08T14:03:06.000+0000

By the way, When I execute https://gist.github.com/2895577 code, it works okay. but when I do the same inside my zf2 project model I get stripped results.

Posted by Gary Hockin (spabby) on 2012-06-08T14:05:35.000+0000

Edit your composer.json to remove the fix hash of beta4 from the dev-master, by removing the # and everything to the right of it. Then php composer.phar install to update to latest master.

Apparently there have been bug fixes since beta4 was tagged.

Posted by Maks 3w (maks3w) on 2012-06-08T14:50:15.000+0000

I tested with Skeleton and the problem is not with Zend\Http, if you do strlen($response->getBody()); you will see the correct value, so the problem is when the View is rendered.

I don't know if use a echo is the correct when you are working with view. You can ask in the IRC for help about how print variables. irc.freenode.net #zftalk.2

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts