KItinerary::HttpResponse

Search for usage in LXR

#include <httpresponse.h>

Properties

QByteArray content
 
QDateTime requestDateTime
 
QUrl url
 

Public Member Functions

 HttpResponse (const HttpResponse &)
 
QByteArray content () const
 
 operator QVariant () const
 
HttpResponseoperator= (const HttpResponse &)
 
QDateTime requestDateTime () const
 
QUrl url () const
 

Static Public Member Functions

static HttpResponse fromHarEntry (const QJsonObject &harEntry)
 
static QList< HttpResponsefromHarFile (const QByteArray &harFile)
 
static HttpResponse fromNetworkReply (QNetworkReply *reply)
 

Detailed Description

Container for an HTTP response to be passed into the extractor engine.

This is primarily needed for extracting data from arbitrary API responses or for custom website extractors, as we cannot trigger extractor scripts on HTTP request or response parameters (such as the URL) otherwise.

For operational use this can be created from a QNetworkReply, the support for HAR files is mainly intended for development use.

Definition at line 32 of file httpresponse.h.

Property Documentation

◆ content

QByteArray KItinerary::HttpResponse::content
read

Definition at line 36 of file httpresponse.h.

◆ requestDateTime

QDateTime KItinerary::HttpResponse::requestDateTime
read

Definition at line 37 of file httpresponse.h.

◆ url

QUrl KItinerary::HttpResponse::url
read

Definition at line 35 of file httpresponse.h.

Constructor & Destructor Documentation

◆ HttpResponse()

HttpResponse::HttpResponse ( )

Definition at line 28 of file httpresponse.cpp.

Member Function Documentation

◆ content()

QByteArray HttpResponse::content ( ) const

Definition at line 47 of file httpresponse.cpp.

◆ fromHarEntry()

HttpResponse HttpResponse::fromHarEntry ( const QJsonObject & harEntry)
static

Read from an HAR entry.

See also
https://w3c.github.io/web-performance/specs/HAR/Overview.html

Definition at line 68 of file httpresponse.cpp.

◆ fromHarFile()

QList< HttpResponse > HttpResponse::fromHarFile ( const QByteArray & harFile)
static

Read a set of HTTP responses from an HAR file.

Definition at line 92 of file httpresponse.cpp.

◆ fromNetworkReply()

HttpResponse HttpResponse::fromNetworkReply ( QNetworkReply * reply)
static

Create a HttpResponse object from an active QNetworkReply.

Definition at line 57 of file httpresponse.cpp.

◆ operator QVariant()

HttpResponse::operator QVariant ( ) const

Definition at line 37 of file httpresponse.cpp.

◆ requestDateTime()

QDateTime HttpResponse::requestDateTime ( ) const

Definition at line 52 of file httpresponse.cpp.

◆ url()

QUrl HttpResponse::url ( ) const

Definition at line 42 of file httpresponse.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.