mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 12:25:14 +02:00
Restructure HTTPClient for new paradigm
This commit is contained in:
parent
fa55928ea3
commit
409d909d0f
25 changed files with 210 additions and 198 deletions
44
src/Network/HTTPClient/Client/HttpClientOptions.php
Normal file
44
src/Network/HTTPClient/Client/HttpClientOptions.php
Normal file
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Network\HTTPClient\Client;
|
||||
|
||||
use GuzzleHttp\RequestOptions;
|
||||
|
||||
/**
|
||||
* This class contains a list of possible HTTPClient request options.
|
||||
*/
|
||||
class HttpClientOptions
|
||||
{
|
||||
/**
|
||||
* accept_content: (array) supply Accept: header with 'accept_content' as the value
|
||||
*/
|
||||
const ACCEPT_CONTENT = 'accept_content';
|
||||
/**
|
||||
* timeout: (int) out in seconds, default system config value or 60 seconds
|
||||
*/
|
||||
const TIMEOUT = RequestOptions::TIMEOUT;
|
||||
/**
|
||||
* cookiejar: (string) path to cookie jar file
|
||||
*/
|
||||
const COOKIEJAR = 'cookiejar';
|
||||
/**
|
||||
* headers: (array) header array
|
||||
*/
|
||||
const HEADERS = RequestOptions::HEADERS;
|
||||
/**
|
||||
* header: (array) header array (legacy version)
|
||||
*/
|
||||
const LEGACY_HEADER = 'header';
|
||||
/**
|
||||
* content_length: (int) maximum File content length
|
||||
*/
|
||||
const CONTENT_LENGTH = 'content_length';
|
||||
/**
|
||||
* body: (mixed) Setting the body for sending data
|
||||
*/
|
||||
const BODY = RequestOptions::BODY;
|
||||
/**
|
||||
* auth: (array) Authentication settings for specific requests
|
||||
*/
|
||||
const AUTH = RequestOptions::AUTH;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue