Options
All
  • Public
  • Public/Protected
  • All
Menu

This is returned to you when "outputAsJson=true".

Hierarchy

  • IUserResponse

Index

Properties

content

content: object

the rendered output of the last IPageRequest

Type declaration

  • Optional contentErrors?: object[]

    new for Chrome backend. if your IPageRequest had any content errors, they will be listed here.

  • data: string

    data in either base64 or utf8 format

  • Optional doneDetail?: IDoneDetail

    new for Chrome backend. information on what finished the page execution.

    If normal then most likely everything was rendered properly. If another value, be advised your content may not have rendered properly. Inspect the value of statusCode and Please see contentErrors and/or execErrors for details on what could have occured. Additionaly, inspect other parameters for hints, such as resourceSummary and pageExecLastWaitedOn

  • encoding: string

    utf8 or base64

  • Optional eventPhase?: IPageEventPhase

    new for Chrome backend. the rendered page's final eventPhase. see IPageResponse.eventPhase for further explanation

  • Optional execErrors?: object[]

    new for Chrome backend. if the rendering system experienced any errors when processing the page, they will be listed here.

  • Optional extraHeaders?: object

    extra response headers you want sent with your response. set by IRenderSettings.extraResponseHeaders

    • [name: string]: string
  • Optional headers?: object

    headers of the target url, only set if IRenderSettings.passThroughHeaders===true

    • [name: string]: string
  • name: string

    filename you could use if saving the content to disk. this will be something like 'content.text', 'content.jpeg', 'content.pdf' thus this informs you of the content type

  • Optional pageExecLastWaitedOn?: string

    new for Chrome backend. for debugging your request, if our IPageRequest didn't succeed with statusCode 200, we'll output the last thing waited on.

  • Optional passThroughStatusCode?: boolean

    set via IRenderSettings.passThroughStatusCode, if this is true, when returning the response to you, the content's status code will be sent, irrespective of your API statusCode.

  • Optional resourceSummary?: IResourceSummary

    new for Chrome backend. summary of all resources requested by the page. see IPageResponse.resources for detailed listings

  • size: number

    the size of data, in bytes

  • statusCode: number

    status of the content.

    • 200: Everything good, no errors were encountered at all
    • 408: The targetURL was unable to load.
    • 424: Some errors were encountered during rendering the page. These may be harmless script errors in the page itself, but it also may be something that could impact your rendered output. Please see contentErrors and/or execErrors for details. Additionaly, inspect other parameters for hints, such as resourceSummary and pageExecLastWaitedOn
  • url: string

    the final url of the IPageRequest after redirects

Optional meta

meta: object

metadata about the transaction

Type declaration

  • Optional backend?: object

    information about the PhantomJsCloud.com system processing this transaction

    • id: string

      identifier of the system, for troubleshooting purposes

    • os: string
    • platform: string

      Chrome or PhantomJs

    • platformVersion: any

      (major/minor/point)

    • requestsProcessed: number

      number of requests processed by this backend

  • Optional billing?: object

    how much this transaction costs. NOTE: the creditCost, prepaidCreditsRemaining, and dailySubscriptionCreditsRemaining are also returning in the HTTP Response Headers via the keys pjsc-credit-cost, pjsc-daily-subscription-credits-remaining, and pjsc-prepaid-credits-remaining

    • bytes: number
    • Optional creditCost?: number

      the total cost of this response

    • Optional dailySubscriptionCreditsRemaining?: number

      estimation of your remaining daily creditBalance. This is incrementally refilled hourly.

    • elapsedMs: number
    • Optional endTime?: string

      the end time of your IUserRequest.

    • Optional prepaidCreditsRemaining?: number
    • Optional startTime?: string

      the start time of your IUserRequest.

  • Optional outputAsJson?: boolean

    if true, informs our server to send back JSON, including the response plus metadata. if False, if should send back only the content.

    default

    false

  • Optional trace?: object[]

    debug trace information provided by the api.

originalRequest

originalRequest: IUserRequest

the original request, without defaults applied. to see the request with defaults, see IPageResponse.pageRequest

pageResponses

pageResponses: IPageResponse[]

a collection of load/processing information for each IPageRequest you requested.

statusCode

statusCode: number

the HTTP Status Code PhantomJsCloud returns to you

Optional statusMessage

statusMessage: string

if an error was detected, we will try to supply a statusMessage to help debug. Additionally,this will be placed as the pjsc-status-message response header.