File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -54,11 +54,18 @@ class Request implements \JsonSerializable
54
54
55
55
public function __toString ()
56
56
{
57
+ if (isset ($ this ->body )) {
58
+ $ bodyValue = $ this ->body ->getValue ();
59
+ if (!is_string ($ bodyValue )) {
60
+ $ bodyValue = print_r ($ bodyValue , true );
61
+ }
62
+ }
63
+
57
64
return print_r (
58
65
[
59
66
'method ' => $ this ->method ,
60
67
'url ' => isset ($ this ->url ) ? $ this ->url ->__toString () : 'null ' ,
61
- 'body ' => isset ($ this ->body ) ? $ this ->body ->getMatcher () . ' => ' . (isset ($ this -> body -> getValue () [5000 ]) ? '--VERY LONG CONTENTS-- ' : $ this -> body -> getValue () ) : 'null ' ,
68
+ 'body ' => isset ($ this ->body ) ? $ this ->body ->getMatcher () . ' => ' . (isset ($ bodyValue [5000 ]) ? '--VERY LONG CONTENTS-- ' : $ bodyValue ) : 'null ' ,
62
69
'headers ' => print_r ($ this ->headers , true ),
63
70
],
64
71
true
You can’t perform that action at this time.
0 commit comments