Skip to content

Instantly share code, notes, and snippets.

@kaorukobo
Created July 20, 2012 17:10
Show Gist options
  • Save kaorukobo/3151940 to your computer and use it in GitHub Desktop.
Save kaorukobo/3151940 to your computer and use it in GitHub Desktop.
post() error with httpful
require('httpful/bootstrap.php');
$resp = \Httpful\Request::post($url)->sendsJson()->body($json)->send();
<b>Fatal error</b>:
Uncaught exception 'Exception' with message 'Unable to parse response code from HTTP response due to malformed response' in httpful/src/Httpful/Response.php:128
Stack trace:
#0 httpful/src/Httpful/Response.php(38): Httpful\Response-&gt;_parseCode('HTTP/1.1 100 Co...')
#1 httpful/src/Httpful/Request.php(175): Httpful\Response-&gt;__construct('HTTP/1.1 200 OK...', 'HTTP/1.1 100 Co...', Object(Httpful\Request))
#2 Httpful\Request-&gt;send()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment