Skip to content

Latest commit

 

History

History
232 lines (169 loc) · 5.75 KB

URLConnection.md

File metadata and controls

232 lines (169 loc) · 5.75 KB

URLConnection

  • class URLConnection (php\net\URLConnection)
  • package std
  • source php/net/URLConnection.php

Description

Class URLConnection


Properties


Static Methods


Methods


Static Methods

guessContentTypeFromStream()

URLConnection::guessContentTypeFromStream(php\io\Stream $stream): string

Tries to determine the type of an input stream based on the characters at the beginning of the input stream. This method can be used by subclasses that override the getContentType method.


guessContentTypeFromName()

URLConnection::guessContentTypeFromName(string $name): string

create()

URLConnection::create(string $url, php\net\Proxy $proxy): URLConnection

enableSSLVerificationForHttps()

URLConnection::enableSSLVerificationForHttps(): void

Enable checking ssl for https


disableSSLVerificationForHttps()

URLConnection::disableSSLVerificationForHttps(): void

Disable checking ssl for https


Methods

__construct()

__construct(php\net\URLConnection $parent): void

connect()

connect(): void

Opens a communications link to the resource referenced by this URL, if such a connection has not already been established.


getHeaderField()

getHeaderField(string $name): void

getHeaderFields()

getHeaderFields(): array

getInputStream()

getInputStream(): Stream

getErrorStream()

getErrorStream(): Stream

getOutputStream()

getOutputStream(): Stream

setRequestProperty()

setRequestProperty(string $name, string $value): void

getRequestProperty()

getRequestProperty(string $name): void

getRequestProperties()

getRequestProperties(): array

disconnect()

disconnect(): void

Indicates that other requests to the server are unlikely in the near future. Calling disconnect() should not imply that this HttpURLConnection instance can be reused for other requests.


setChunkedStreamingMode()

setChunkedStreamingMode(int $chunklen): void

This method is used to enable streaming of a HTTP request body without internal buffering, when the content length is not known in advance. In this mode, chunked transfer encoding is used to send the request body. Note, not all HTTP servers support this mode.