Questions tagged [zend-http-client]

Zend_Http_Client provides an easy interface for preforming Hyper-Text Transfer Protocol (HTTP) requests.

Zend_Http_Client provides an easy interface for preforming Hyper-Text Transfer Protocol (HTTP) requests. Zend_Http_Client supports most simple features expected from an HTTP client, as well as some more complex features such as HTTP authentication and file uploads. Successful requests (and most unsuccessful ones too) return a Zend_Http_Response object, which provides access to the response's headers and body.

62 questions
1
vote
0 answers

CURLOPT_FOLLOWLOCATION equivalent for socket adapter in Zend_Http_client

I would like to use the socket adapter instead of Curl for my code but however this the problem i am facing. (case 1 :) I am querying a server for response using Zend_http_client (default socket adapter) and I am getting a 404 error, (case 2 :)…
1
vote
1 answer

Remote Address Parameter in Zend_Http_Client

Am developing a public site that uses the Zend_Http_Client to access remote logic.Is there a property/way in the Client adapter that I could set the remote address of the user browsing the site? Currently am using this workaround which combines both…
davykiash
  • 1,796
  • 5
  • 27
  • 60
1
vote
1 answer

Zend Http Client Reponse header data?

I get json file content using the zend http client in magento. I don't need header info on getBody(). I did test it on some host where it works. But the live host gives me troubles. $request_url = "link"; $httpClientConfig = array('maxredirects' =>…
1
vote
1 answer

PHP - Zend keeping sessions alive

I am making requests from Product 1 to Product 2. 3 requests will be sent, the first is authentication via POST where a session will be set on the receiving server, two will be the GET requests to the REST action of choice and three will be the…
Kal
  • 2,239
  • 6
  • 36
  • 74
1
vote
1 answer

How can I set PUT parameters in Zend's HTTP Client

I'm trying to use the PUT method with the Zend Http Client but I'm unable to add parameters to the request. Here's my code snippet: $client = new Zend_Http_Client($this->url); $client->setAuth($this->username, $this->password,…
user2509780
  • 121
  • 2
  • 9
1
vote
1 answer

POST request with Zend_Http_Client or CURL

I was trying to retrieve data from remote server but it wasn't working & sending empty data. Here is the code that I tried: define('WWW_PATH', dirname(__FILE__) . '/../..'); set_include_path(implode(PATH_SEPARATOR, array(realpath(WWW_PATH .…
Jibon
  • 232
  • 6
  • 26
1
vote
0 answers

Capture traffic from zend_http_client via fiddler

Im using zend_http_client and used code below to force traffic to fiddler : $Http_Client = new Zend_Http_Client($Address); $config = array( 'adapter' => 'Zend_Http_Client_Adapter_Proxy', …
Abadis
  • 2,671
  • 5
  • 28
  • 42
1
vote
1 answer

Zend_Feed_Reader behind a Proxy

am new to Zend and want to use the Zend_Feed_Reader class behind a Proxy. I've been told that I need "replace the default instance of Zend_Http_Client used by Zend_Feed_Reader using the setHttpClient() static method. The replacement should be a new…
1
vote
1 answer

Does a singleton pattern in an HTTP client class cause race conditions?

I'm using the Zend HTTP client to implement a web client for communicating with a third-party service. I was thinking about making it a singleton pattern so each call could take advantage of using cookies from the service, so that we wouldn't need…
dsw88
  • 4,400
  • 8
  • 37
  • 50
1
vote
1 answer

post big data via Zend_Http_Client_Adapter_Curl

I use $site->setParameterPost and $site->request('POST')->getBody() for posting data to an action, one parameter of setParameterPost is very big data, and it doesn't send data via post method. What can I do? $config = array('adapter' =>…
Arash Mousavi
  • 2,110
  • 4
  • 25
  • 47
1
vote
2 answers

Zend_Http_Client - Why does my POST request send the wrong content-type header?

I'm making a call to an external service using the Zend Http client. The service allows me to upload files to their storage system. It requires relevant params (userid, etc.) to be sent in the query string, and the file upload content should be sent…
dsw88
  • 4,400
  • 8
  • 37
  • 50
0
votes
1 answer

Zend_HTTP_Client - How to set content type on PUT?

I'm using the Zend_HTTP_Client to make a REST call to a web service. The service is a data service that supports the usual CRUD suspects. The service itself is working normally. I'm able to connect to the service using the Zend client, with one…
dsw88
  • 4,400
  • 8
  • 37
  • 50
0
votes
0 answers

auto-loader in Zend Framework 3.0.3-dev

Being novice to Zend framework and after reading almost all the possible answers already posted, It did not work. I want to set up an instance of Zend Framework auto-loader and Zend_Http_Client class. code is as: require_once…
0
votes
1 answer

Zend HTTP Client Invalid URI?

I'm having trouble using Zend HTTP on a URL: $client = new Zend_Http_Client('http://xxfire_killumiex.api.channel.livestream.com/2.0/info.json'); $feed = $client->request()->getBody(); For some reason, this gives me an error... Invalid URI…
Jason Axelrod
  • 7,155
  • 10
  • 50
  • 78
0
votes
0 answers

Zend_Http_Client POST 'missing required parameters'

First of all, I looked at this question and tried the solution, did not work for me. I am working in Zend 1.12 on a PHP 7.0.22 server. I have a function that should post data to an API and receive a confirmation of the post. Whenever I test it…
nclsvh
  • 2,628
  • 5
  • 30
  • 52