Class: Playwright::Response

Inherits:
PlaywrightApi show all
Defined in:
lib/playwright_api/response.rb

Overview

‘Response` class represents responses which are received by page.

Instance Method Summary collapse

Methods inherited from PlaywrightApi

from_channel_owner

Instance Method Details

#bodyObject

Returns the buffer with response body.

Raises:

  • (NotImplementedError)


6
7
8
# File 'lib/playwright_api/response.rb', line 6

def body
  raise NotImplementedError.new('body is not implemented yet.')
end

#finishedObject

Waits for this response to finish, returns failure error if request failed.

Raises:

  • (NotImplementedError)


11
12
13
# File 'lib/playwright_api/response.rb', line 11

def finished
  raise NotImplementedError.new('finished is not implemented yet.')
end

#frameObject

Returns the ‘Frame` that initiated this response.

Raises:

  • (NotImplementedError)


16
17
18
# File 'lib/playwright_api/response.rb', line 16

def frame
  raise NotImplementedError.new('frame is not implemented yet.')
end

#headersObject

Returns the object with HTTP headers associated with the response. All header names are lower-case.

Raises:

  • (NotImplementedError)


21
22
23
# File 'lib/playwright_api/response.rb', line 21

def headers
  raise NotImplementedError.new('headers is not implemented yet.')
end

#jsonObject

Returns the JSON representation of response body.

This method will throw if the response body is not parsable via ‘JSON.parse`.

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/playwright_api/response.rb', line 28

def json
  raise NotImplementedError.new('json is not implemented yet.')
end

#okObject

Contains a boolean stating whether the response was successful (status in the range 200-299) or not.

Raises:

  • (NotImplementedError)


33
34
35
# File 'lib/playwright_api/response.rb', line 33

def ok
  raise NotImplementedError.new('ok is not implemented yet.')
end

#requestObject

Returns the matching ‘Request` object.

Raises:

  • (NotImplementedError)


38
39
40
# File 'lib/playwright_api/response.rb', line 38

def request
  raise NotImplementedError.new('request is not implemented yet.')
end

#statusObject

Contains the status code of the response (e.g., 200 for a success).

Raises:

  • (NotImplementedError)


43
44
45
# File 'lib/playwright_api/response.rb', line 43

def status
  raise NotImplementedError.new('status is not implemented yet.')
end

#status_textObject

Contains the status text of the response (e.g. usually an “OK” for a success).

Raises:

  • (NotImplementedError)


48
49
50
# File 'lib/playwright_api/response.rb', line 48

def status_text
  raise NotImplementedError.new('status_text is not implemented yet.')
end

#textObject

Returns the text representation of response body.

Raises:

  • (NotImplementedError)


53
54
55
# File 'lib/playwright_api/response.rb', line 53

def text
  raise NotImplementedError.new('text is not implemented yet.')
end

#urlObject

Contains the URL of the response.

Raises:

  • (NotImplementedError)


58
59
60
# File 'lib/playwright_api/response.rb', line 58

def url
  raise NotImplementedError.new('url is not implemented yet.')
end