-
Docs
Backend
-
Behaviors
-
Classes
-
Controllers
-
Database
-
Seeds
-
-
Facades
-
FormWidgets
-
Helpers
-
Exception
- Backend
-
-
Models
-
ReportWidgets
-
Skins
-
Traits
-
Widgets
- ServiceProvider
-
-
Cms
-
Classes
- Asset
- AutoDatasource
- CmsCompoundObject
- CmsController
- CmsException
- CmsObject
- CmsObjectCollection
- CodeBase
- CodeParser
- ComponentBase
- ComponentHelpers
- ComponentManager
- ComponentPartial
- Content
- Controller
- Layout
- LayoutCode
- MediaLibrary
- MediaLibraryItem
- MediaViewHelper
- Meta
- ObjectMemoryCache
- Page
- PageCode
- Partial
- PartialCode
- PartialStack
- Router
- Theme
- ThemeManager
-
Components
-
Contracts
-
Controllers
-
Facades
-
FormWidgets
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ComponentNode
- ComponentTokenParser
- ContentNode
- ContentTokenParser
- DebugExtension
- DefaultNode
- DefaultTokenParser
- Extension
- FlashNode
- FlashTokenParser
- FrameworkNode
- FrameworkTokenParser
- Loader
- PageNode
- PageTokenParser
- PartialNode
- PartialTokenParser
- PlaceholderNode
- PlaceholderTokenParser
- PutNode
- PutTokenParser
- ScriptsNode
- ScriptsTokenParser
- StylesNode
- StylesTokenParser
-
Widgets
- ServiceProvider
-
-
System
-
Behaviors
-
Classes
-
Console
-
Controllers
-
Database
-
Helpers
-
Models
-
ReportWidgets
-
Traits
-
Twig
- ServiceProvider
-
-
Events
-
backend
-
ajax
-
filter
-
form
-
list
-
menu
-
page
-
user
-
-
cms
-
ajax
-
block
-
combiner
-
component
-
object
-
page
-
router
-
template
-
theme
-
-
halcyon
-
datasource
-
-
mailer
-
media
-
model
-
system
-
assets
-
console
-
mirror
-
theme
-
-
reportwidgets
-
settings
- extendConfigFile
-
-
translator
-
-
Library
-
Argon
-
Auth
-
Models
- AuthException
- Manager
-
-
Config
-
Cookie
-
Middleware
-
-
Database
-
Attach
-
Behaviors
-
Concerns
-
Connections
-
Connectors
-
Models
-
Relations
-
Schema
-
Traits
-
Updates
- README
- Builder
- Collection
- DatabaseServiceProvider
- DataFeed
- Dongle
- MemoryCache
- Model
- ModelBehavior
- ModelException
- NestedTreeScope
- Pivot
- QueryBuilder
- SortableScope
- TreeCollection
- Updater
-
-
Events
-
Exception
-
Extension
-
Filesystem
-
Flash
-
Foundation
-
Bootstrap
-
Console
-
Exception
-
Http
-
Middleware
- Kernel
-
-
Providers
- Application
- Maker
-
-
Halcyon
-
Datasource
-
Exception
-
Processors
-
Traits
- README
- Builder
- Collection
- HalcyonServiceProvider
- MemoryCacheManager
- MemoryRepository
- Model
-
-
Html
-
Mail
-
Network
-
Parse
-
Router
-
Scaffold
-
Support
-
Translation
-
- Documentation
- API
- Library
- Network
- Http
October\Rain\Network\Http
Source: ~/vendor/october/rain/src/Network/Http.php
HTTP Network Access
Used as a cURL wrapper for the HTTP protocol.
Public properties
public string $url
The HTTP address to use.
public string $method
The method the request should use.
public array $headers
The headers to be sent with the request.
public string $body
The last response body.
public string $rawBody
The last response body (without headers extracted).
public array $code
The last returned HTTP code.
public array $info
The cURL response information.
public array $requestOptions
cURL Options.
public array $requestData
Request data.
public array $requestHeaders
Request headers.
public string $argumentSeparator
Argument separator.
public string $streamFile
If writing response to a file, which file to use.
public string $streamFilter
If writing response to a file, which write filter to apply.
public int $maxRedirects
The maximum redirects allowed.
Protected properties
protected int $redirectCount
Internal counter
Public methods
public string __toString()
Handy if this object is called directly.
public self auth(string $user, string $pass=NULL)
Adds authentication to the comms.
Parameters
- string $user
- string $pass
public self data(string $value, $value=NULL)
Add a data to the request.
Parameters
- string $value
- $value
public static self delete(string $url, array $options=NULL)
Make a HTTP DELETE call.
Parameters
- string $url
- array $options
public static self get(string $url, array $options=NULL)
Make a HTTP GET call.
Parameters
- string $url
- array $options
public string getRequestData()
Return the request data set.
public self header(string $value, $value=NULL)
Add a header to the request.
Parameters
- string $value
- $value
public static void make(string $url, string $method, callable $options=NULL)
Make the object with common properties
Parameters
- string $url - HTTP request address
- string $method - Request method (GET, POST, PUT, DELETE, etc)
- callable $options - Callable helper function to modify the object
public void noRedirect()
Disable follow location (redirects)
public static self options(string $url, array $options=NULL)
Make a HTTP OPTIONS call.
Parameters
- string $url
- array $options
public static self patch(string $url, array $options=NULL)
Make a HTTP PATCH call.
Parameters
- string $url
- array $options
public static self post(string $url, array $options=NULL)
Make a HTTP POST call.
Parameters
- string $url
- array $options
public void proxy($type, $host, $port, $username=NULL, $password=NULL)
Sets a proxy to use with this request
Parameters
- $type
- $host
- $port
- $username
- $password
public static self put(string $url, array $options=NULL)
Make a HTTP PUT call.
Parameters
- string $url
- array $options
public string send()
Execute the HTTP request.
public self setOption(string $option, string $value=NULL)
Add a single option to the request.
Parameters
- string $option
- string $value
public self timeout(string $timeout)
Sets the request timeout.
Parameters
- string $timeout
public self toFile(string $path, string $filter=NULL)
Write the response to a file
Parameters
- string $path - Path to file
- string $filter - Stream filter as listed in stream_get_filters()
public void verifySSL()
Enable SSL verification
Protected methods
protected array headerToArray(string $header)
Turn a header string into an array.
Parameters
- string $header