2

I'm having this same issue in my code, but I'm not passing addPostFile method. So I was wondering if I need to pass some others configuration to the request object.

Any idea?

Here is my code

$request = new HttpRequest($myURL, HttpRequest::METH_GET);
$request->setBody('');
$request->addQueryData(
    array(
        'service' => 'delete',
        'data' => $dataSend
    ));
$request->send();
Didzán
  • 21
  • 1
  • This question sounds like an answer that was ported over to a question. Please reword it if you want to receive any decent help. – hjavaher Nov 16 '15 at 22:55

1 Answers1

0
  1. Remove the $request->setBody(''); You're making a get request and should not have a body to the request.
  2. Make sure $dataSend isn't null $dataSend = is_null($dataSend)? "":dataSend
Ray
  • 40,256
  • 21
  • 101
  • 138