clearFusionCMS 3.0.0
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • clearFusionCMS
    • module
      • cloudflare
      • comments
      • content
      • forms
      • members
      • search
  • fusionLib
  • None

Classes

  • _flFormGroup
  • _flUtf8Base
  • flAcMgr
  • flApiDbInstaller
  • flApiKeyMgr
  • flApiServer
  • flApiService
  • flApp
  • flAuthTOTP
  • flBufferCode
  • flBufferCss
  • flBufferJs
  • flCache
  • flCacheAPC
  • flCacheDb
  • flCacheDbInstaller
  • flCacheDummy
  • flCacheFile
  • flCacheFunction
  • flCacheMemcache
  • flCacheMemcached
  • flCacheOutput
  • flCacheRedis
  • flCacheSqlite
  • flConfig
  • flConfigDb
  • flConfigDbInstaller
  • flConfigFile
  • flConfigIni
  • flController
  • flControllerAction
  • flDate
  • flDateTzMenu
  • flDb
  • flDbInstaller
  • flDbInstallerInterface
  • flDbMySQL
  • flDbMySQLi
  • flDbMySQLiResult
  • flDbMySQLResult
  • flDbNestedSet
  • flDbResult
  • flDbSQLite
  • flDbSQLite3
  • flDbSQLite3Result
  • flDbSQLiteResult
  • flEmail
  • flEvent
  • flEventDbInstaller
  • flEventManager
  • flExceptionErrorController
  • flExceptionReporter
  • flForm
  • flFormBuilder
  • flFormDecorator
  • flFormDecoratorDl
  • flFormDecoratorDtDd
  • flFormDecoratorFieldset
  • flFormDecoratorForm
  • flFormDecoratorLi
  • flFormDecoratorList
  • flFormDecoratorUl
  • flFormElement
  • flFormElementButton
  • flFormElementCheckbox
  • flFormElementChecklist
  • flFormElementEmail
  • flFormElementFile
  • flFormElementHidden
  • flFormElementImage
  • flFormElementInteger
  • flFormElementNumber
  • flFormElementPane
  • flFormElementPassword
  • flFormElementRadio
  • flFormElementRecaptcha
  • flFormElementSearch
  • flFormElementSelect
  • flFormElementSubmit
  • flFormElementText
  • flFormElementTextArea
  • flFormElementTextSuggest
  • flFormElementUri
  • flFormElementWYSIWYG
  • flFormValidator
  • flFormValidatorAttribMax
  • flFormValidatorAttribMin
  • flFormValidatorCustomJS
  • flFormValidatorEmail
  • flFormValidatorEquals
  • flFormValidatorInteger
  • flFormValidatorMax
  • flFormValidatorMaxChecklist
  • flFormValidatorMaxLength
  • flFormValidatorMin
  • flFormValidatorMinChecklist
  • flFormValidatorMinLength
  • flFormValidatorMultiEmail
  • flFormValidatorNotEquals
  • flFormValidatorNumber
  • flFormValidatorRegex
  • flFormValidatorRequired
  • flFormValidatorSameAs
  • flFormValidatorUri
  • flFtpClient
  • flGravatar
  • flHttpClient
  • flHttpClientCookie
  • flImage
  • flImageFilter
  • flImageFilterBrightness
  • flImageFilterColorize
  • flImageFilterContrast
  • flImageFilterEdgeDetect
  • flImageFilterEmboss
  • flImageFilterGaussianBlur
  • flImageFilterGrayscale
  • flImageFilterMeanRemoval
  • flImageFilterNegative
  • flImageFilterPixelate
  • flImageFilterSelectiveBlur
  • flImageFilterSepia
  • flImageFilterSepia2
  • flImageFilterSmooth
  • flIntegrity
  • flKeygen
  • flLog
  • flLogHandlerChrome
  • flLogHandlerLoggly
  • flLogHandlerPapertrail
  • flLogHandlerSlack
  • flMimeTypes
  • flModuleDbInstaller
  • flModuleMgr
  • flRegistry
  • flRequest
  • flRequestDbInstaller
  • flRequestThrottle
  • flResponse
  • flRouter
  • flRouterRoute
  • flRssChannel
  • flRssClient
  • flRssItem
  • flSearch
  • flSearchIndexer
  • flSearchManager
  • flSearchResults
  • flSearchTags
  • flSession
  • flSessionData
  • flSessionDb
  • flSessionDbInstaller
  • flSessionFile
  • flSessionMemcache
  • flSessionMemcached
  • flSessionRedis
  • flTemplateDbInstaller
  • flTemplateEngine
  • flTemplateManager
  • flTextHTML
  • flTextSplitWords
  • flTextStemmer
  • flTextStemmerEn
  • flTextStrip
  • flTimer
  • flUri
  • flUser
  • flUserAdapter
  • flUserAdapterRemote
  • flUserDbInstaller
  • flUserMgr
  • flUserPwdGen
  • flUserServerApiV1
  • flUtf8
  • flUuid
  • flVariables
  • flVariablesDbInstaller
  • flWidgetBreadcrumb
  • flWidgetFloatingActionMenu
  • flWidgetPagination
  • flWidgetTable
  • flWidgetTabs
  • flWidgetToolbar
  • flWidgetTreeChildNode
  • flWidgetTreeLinkNode
  • flWidgetTreeNode
  • flWidgetTreeView
  • fusionLib

Interfaces

  • flFormElementWYSIWYGCodeInterface
  • flFormElementWYSIWYGInterface
  • flFormElementWYSIWYGTransformInterface
  • flLogHandler
  • flModuleInstallInterface

Exceptions

  • flAcException
  • flAppException
  • flCacheException
  • flConfigException
  • flDateException
  • flDbException
  • flEventException
  • flException
  • flExceptionBadRequest
  • flExceptionForbidden
  • flExceptionLoadClass
  • flExceptionNotFound
  • flExceptionPHP
  • flFormException
  • flHttpClientException
  • flImageException
  • flRegistryException
  • flRequestThrottleException
  • flRouterException
  • flSessionException
  • flTemplateEngineException
  • flUserException
  • flVariablesException
  • flWidgetException

Functions

  • __
  • __noop
  • _flErrorHandler
  • _n
  • _n_noop

Class flHttpClient

flHttpClient Class

The default operation of GET is used if there is no data or files to POST.

Although cookies are supported neither the path nor expire date is checked.

See http://wp.netscape.com/newsref/std/cookie_spec.html for information on cookies

Package: fusionLib
Copyright: Copyright (c) 2007 - 2016 fusionLib. All rights reserved.
Located at system/libs/Http/flHttpClient.php

Methods summary

public
# __construct( string $uri = null )

Create a new request object.

Create a new request object.

Parameters

$uri
The URI to access.
public flHttpClient
# setTimeout( integer $timeout )

Set the timeout.

Set the timeout.

Parameters

$timeout
The timeout in seconds.

Returns

flHttpClient
This object.
public flHttpClient
# setContentType( string $contentType )

Set the content type for the request if no file upload.

Set the content type for the request if no file upload.

Parameters

$contentType
The content type.

Returns

flHttpClient
This object.
public flHttpClient
# setUri( string $uri = null )

Set the URI to access.

Set the URI to access.

Parameters

$uri
The URI to access, this may contain a username and password.

Returns

flHttpClient
This object.

Throws

flHttpClientException
public flHttpClient
# setMaxSize( integer $size )

Set the maximum size of a page that will be accepted, this has no effect when storing to disk.

Set the maximum size of a page that will be accepted, this has no effect when storing to disk.

Parameters

$size
The maximum allowed page size in bytes or 0 to allow any size.

Returns

flHttpClient
This object.
public flHttpClient
# setAuth( string $username, string $password )

Set the username and password to use for authentication.

Set the username and password to use for authentication.

Parameters

$username
The username to use.
$password
The password to use.

Returns

flHttpClient
This object.
public flHttpClient
# clearAuth( )

Clear the authentication information.

Clear the authentication information.

Returns

flHttpClient
This object.
public flHttpClient
# addHeader( string $header, string $value )

Add a header field.

Add a header field.

Parameters

$header
The header to add
$value
The value to assign to the header.

Returns

flHttpClient
This object.
public flHttpClient
# removeHeader( string $header )

Remove a previously added header.

Remove a previously added header.

Parameters

$header
The header to remove.

Returns

flHttpClient
This object.
public flHttpClient
# clearHeaders( )

Clear all headers.

Clear all headers.

Returns

flHttpClient
This object.
public flHttpClient
# addPostData( string $name, string $value )

Add a value to post during the request.

Add a value to post during the request.

Parameters

$name
The name of the value
$value
The value to post.

Returns

flHttpClient
This object.
public flHttpClient
# removePostData( string $name )

Remove a post value.

Remove a post value.

Parameters

$name
The name of the post value to remove.

Returns

flHttpClient
This object.
public flHttpClient
# clearPostData( )

Clear all post data.

Clear all post data.

Returns

flHttpClient
This object.
public flHttpClient
# setPostData( array $data )

Set the data to post during the request, all existing data is replaced.

Set the data to post during the request, all existing data is replaced.

Parameters

$data
Array of name value pairs for the data to send, or string of data only if not uploading files.

Returns

flHttpClient
This object.
public flHttpClient
# addQueryData( string $name, string $value )

Add a value to query string.

Add a value to query string.

Parameters

$name
The name of the value
$value
The value to add.

Returns

flHttpClient
This object.
public flHttpClient
# removeQueryData( string $name )

Remove a query value.

Remove a query value.

Parameters

$name
The name of the query value to remove.

Returns

flHttpClient
This object.
public flHttpClient
# clearQueryData( )

Clear all query data.

Clear all query data.

Returns

flHttpClient
This object.
public flHttpClient
# setQueryData( array $data )

Set the query string data to use during the request, all existing data is replaced.

Set the query string data to use during the request, all existing data is replaced.

Parameters

$data
Array of name value pairs for the data to send.

Returns

flHttpClient
This object.
public flHttpClient
# addFile( string $name, string $file, string $mimeType = null, string $data = null )

Add a file to be posted.

Add a file to be posted.

Parameters

$name
The name to send the file as.
$file
The path to the file to send in the post.
$mimeType
The mime type of the file or null to autodetect from the file extension.
$data
If present then this is sent as the file contents, if null then the contents are loaded from the file.

Returns

flHttpClient
This object.
public flHttpClient
# removeFile( string $name )

Remove the named file.

Remove the named file.

Parameters

$name
The name of the file to remove.

Returns

flHttpClient
This object.
public flHttpClient
# clearFiles( )

Remove all the files.

Remove all the files.

Returns

flHttpClient
This object.
public flHttpClient
# followRedirects( boolean $follow )

Flags if redirects should be followed.

Flags if redirects should be followed.

Parameters

$follow
True if redirects should be followed or false if not.

Returns

flHttpClient
This object.
public flHttpClient
# addCookie( flHttpClientCookie $cookie )

Add a cookie to use with requests.

Add a cookie to use with requests.

Parameters

$cookie
The cookie.

Returns

flHttpClient
This object.
public flHttpClient
# clearCookies( )

Remove all cookies.

Remove all cookies.

Returns

flHttpClient
This object.
public array
# getCookies( )

Get an array of the cookies set by the server.

Get an array of the cookies set by the server.

Returns

array
Array of all cookies [domain][path][name] => flHttpClientCookie
public flHttpClient
# setCookies( array $cookies )

Set all cookies replacing any existing.

Set all cookies replacing any existing.

Parameters

$cookies
Array of cookies [domain][path][name] => flHttpClientCookie

Returns

flHttpClient
This object.
public flHttpClient
# ignoreCookies( boolean $ingoreCookies )

Flags if cookies sent from the server should be ignored or accepted.

Flags if cookies sent from the server should be ignored or accepted.

Parameters

$ingoreCookies
True if cookies should be accepted or false to ignore them.

Returns

flHttpClient
This object.
public boolean
# sendRequest( string $method = null )

Send the request.

Send the request.

Parameters

$method
The method to use for the request of null to auto select POST or GET.

Returns

boolean
true if the request was sent or false if an error occurred.
public string
# getBody( )

Return the page body loaded from the last request.

Return the page body loaded from the last request.

Returns

string
The page body.
public integer
# getResponseCode( )

Get the response code from the last request.

Get the response code from the last request.

Returns

integer
The response code.
public array
# getResponseHeaders( )

Get the response headers from the last request.

Get the response headers from the last request.

Returns

array
Array of headers.

Constants summary

string GET

Request method.

Request method.

# 'GET'
string POST
# 'POST'
string PUT
# 'PUT'
string HEAD
# 'HEAD'
string DELETE
# 'DELETE'
string TRACE
# 'TRACE'
string OPTIONS
# 'OPTIONS'
string CONNECT
# 'CONNECT'
clearFusionCMS 3.0.0 API documentation generated by ApiGen