Overview

Namespaces

  • LINE
    • LINEBot
      • Constant
      • Event
        • MessageEvent
        • Parser
      • Exception
      • HTTPClient
      • ImagemapActionBuilder
      • MessageBuilder
        • Imagemap
        • TemplateBuilder
      • TemplateActionBuilder

Classes

  • Response
  • SignatureValidator

Interfaces

  • HTTPClient
  • ImagemapActionBuilder
  • MessageBuilder
  • TemplateActionBuilder
  • Overview
  • Namespace
  • Class

Class Response

A class represents API response.

Namespace: LINE\LINEBot
Package: LINE\LINEBot
Located at LINEBot/Response.php
Methods summary
public
# __construct( integer $httpStatus, string $body, string[] $headers = [] )

Response constructor.

Response constructor.

Parameters

$httpStatus
HTTP status code of response.
$body
Request body.
$headers
public integer
# getHTTPStatus( )

Returns HTTP status code of response.

Returns HTTP status code of response.

Returns

integer
HTTP status code of response.
public boolean
# isSucceeded( )

Returns request is succeeded or not.

Returns request is succeeded or not.

Returns

boolean
Request is succeeded or not.
public string
# getRawBody( )

Returns raw response body.

Returns raw response body.

Returns

string
Raw request body.
public array
# getJSONDecodedBody( )

Returns response body as array (it means, returns JSON decoded body).

Returns response body as array (it means, returns JSON decoded body).

Returns

array
Request body that is JSON decoded.
public string|null
# getHeader( string $name )

Returns the value of the specified response header.

Returns the value of the specified response header.

Parameters

$name
A String specifying the header name.

Returns

string|null
A response header string, or null if the response does not have a header of that name.
public string[]
# getHeaders( )

Returns all of response headers.

Returns all of response headers.

Returns

string[]
All of the response headers.
line-bot-sdk-php API documentation generated by ApiGen