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 968747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:31:58+00:00 2026-05-16T02:31:58+00:00

I am succesfully calling a REST API with the following code $client = new

  • 0

I am succesfully calling a REST API with the following code

$client = new Zend_Http_Client();
$client->setMethod(Zend_Http_Client::POST);
$client->setUri('http://www.example.com/api/type/');
$client->setParameterPost(array(
    'useremail'  => '******@*****.***',
    'apikey'   => 'secretkey',
    'description' => 'TEST WEB API',
    'amount'   => '5000.00'
    ));

However I would like to get both the header value-(201) and Response Body that are returned after the execution.

How do I proceed with that?

  • 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-16T02:31:59+00:00Added an answer on May 16, 2026 at 2:31 am

    I am assuming that you’re actually executing the request via:

    $response = $client->request();
    

    At that point all you need is in the $response object,

    //Dump headers
    print_r($response->headers);
    
    //Dump body
    echo $response->getBody();
    

    Refer to the Zend_Http_Response docs at:

    http://framework.zend.com/apidoc/1.10/

    for more methods that are available.

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

Sidebar

Ask A Question

Stats

  • Questions 500k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Something like that? def rotate a,len,ii=0,jj=0,t=1 t.times do a =… May 16, 2026 at 2:06 pm
  • Editorial Team
    Editorial Team added an answer I think that's an invalid question, since it relates to… May 16, 2026 at 2:06 pm
  • Editorial Team
    Editorial Team added an answer If you know the location of abc.xml on your filesytem… May 16, 2026 at 2:06 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I am calling a WebMethod from this code: if($(this).attr(checked)) { .. MyWebMethod(variable1, variable2, onSuccessFunction);
I am trying to print character from boot loader using code [BITS 16] ;Tells
I'm making a C# application which is using GameSpy C code (the GP part).
I'm successfully calling a Perl script from a shell script. Now I want to
I am calling cudaMemcpy and the copy returns successfully however the source values are
I have been trying this for hours without success. http://replicaisland.googlecode.com/svn/trunk/ I have added the
im pretty new at Ant and have been looking for alot of examples. I
I have an external web app, which needs to connect to Facebook and get
Overview I am trying to get a photo feed on to my site using
SOLVED I am using delphi 2009. My program listens for usb drives being connected

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.