SuperpoweredSDK  v2.0.2
Superpowered Audio SDK
Superpowered::httpResponse Class Reference

Represents an in-progress or finished HTTP response. More...

#include "SuperpoweredHTTP.h"

Collaboration diagram for Superpowered::httpResponse:

Public Member Functions

 httpResponse ()
 You don't need to use this. More...
 
 ~httpResponse ()
 Destructor. Must use this after a blocking request to prevent memory leaks, but shouldn't be used for asynchronous requests. More...
 

Public Attributes

unsigned int contentLengthBytes
 The content length as reported by the server. More...
 
char * data
 Downloaded response body data (if any, can be NULL). Will be NULL for file transfers. More...
 
unsigned int dataOrFileSizeBytes
 Current output data or file size in bytes. More...
 
unsigned int downloadedBytes
 Bytes downloaded so far. More...
 
char * filepath
 Path to the downloaded response body file (for file transfers, can be NULL otherwise). More...
 
httpDataheaders
 Response headers linked list. More...
 
unsigned int statusCode
 Current status code. More...
 

Static Public Attributes

static const int StatusCode_Canceled = 6
 The request was canceled. More...
 
static const int StatusCode_FileOperationError = 2
 Can't read or write the disk. Perhaps the disk is full or is there a permission problem? More...
 
static const int StatusCode_InvalidResponseError = 4
 Can't parse the server response. More...
 
static const int StatusCode_MaximumRedirectsReachedError = 5
 Too many redirects happened. More...
 
static const int StatusCode_NetworkSocketError = 3
 Can't connect to the server. Perhaps there is no internet connection. More...
 
static const int StatusCode_OutOfMemoryError = 1
 These codes extend the standard HTTP status codes. More...
 
static const int StatusCode_Progress = 7
 Downloading in progress. More...
 
static const int StatusCode_Success = 200
 Successful transfer. More...
 

Detailed Description

Represents an in-progress or finished HTTP response.

Constructor & Destructor Documentation

◆ httpResponse()

Superpowered::httpResponse::httpResponse ( )

You don't need to use this.

◆ ~httpResponse()

Superpowered::httpResponse::~httpResponse ( )

Destructor. Must use this after a blocking request to prevent memory leaks, but shouldn't be used for asynchronous requests.

Member Data Documentation

◆ contentLengthBytes

unsigned int Superpowered::httpResponse::contentLengthBytes

The content length as reported by the server.

◆ data

char* Superpowered::httpResponse::data

Downloaded response body data (if any, can be NULL). Will be NULL for file transfers.

◆ dataOrFileSizeBytes

unsigned int Superpowered::httpResponse::dataOrFileSizeBytes

Current output data or file size in bytes.

◆ downloadedBytes

unsigned int Superpowered::httpResponse::downloadedBytes

Bytes downloaded so far.

◆ filepath

char* Superpowered::httpResponse::filepath

Path to the downloaded response body file (for file transfers, can be NULL otherwise).

◆ headers

httpData* Superpowered::httpResponse::headers

Response headers linked list.

◆ statusCode

unsigned int Superpowered::httpResponse::statusCode

Current status code.

◆ StatusCode_Canceled

const int Superpowered::httpResponse::StatusCode_Canceled = 6
static

The request was canceled.

◆ StatusCode_FileOperationError

const int Superpowered::httpResponse::StatusCode_FileOperationError = 2
static

Can't read or write the disk. Perhaps the disk is full or is there a permission problem?

◆ StatusCode_InvalidResponseError

const int Superpowered::httpResponse::StatusCode_InvalidResponseError = 4
static

Can't parse the server response.

◆ StatusCode_MaximumRedirectsReachedError

const int Superpowered::httpResponse::StatusCode_MaximumRedirectsReachedError = 5
static

Too many redirects happened.

◆ StatusCode_NetworkSocketError

const int Superpowered::httpResponse::StatusCode_NetworkSocketError = 3
static

Can't connect to the server. Perhaps there is no internet connection.

◆ StatusCode_OutOfMemoryError

const int Superpowered::httpResponse::StatusCode_OutOfMemoryError = 1
static

These codes extend the standard HTTP status codes.

Out of memory. Check your code for memory leaks.

◆ StatusCode_Progress

const int Superpowered::httpResponse::StatusCode_Progress = 7
static

Downloading in progress.

◆ StatusCode_Success

const int Superpowered::httpResponse::StatusCode_Success = 200
static

Successful transfer.


The documentation for this class was generated from the following file: