Download the PHP package dd/evolutioncms-snippets-ddmakehttprequest without Composer
On this page you can find all versions of the php package dd/evolutioncms-snippets-ddmakehttprequest. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download dd/evolutioncms-snippets-ddmakehttprequest
More information about dd/evolutioncms-snippets-ddmakehttprequest
Files in dd/evolutioncms-snippets-ddmakehttprequest
Download dd/evolutioncms-snippets-ddmakehttprequest
More information about dd/evolutioncms-snippets-ddmakehttprequest
Files in dd/evolutioncms-snippets-ddmakehttprequest
Vendor dd
Package evolutioncms-snippets-ddmakehttprequest
Short Description Makes HTTP request to a given URL.
License
Homepage https://code.divandesign.biz/modx/ddmakehttprequest
Package evolutioncms-snippets-ddmakehttprequest
Short Description Makes HTTP request to a given URL.
License
Homepage https://code.divandesign.biz/modx/ddmakehttprequest
Please rate this library. Is it a good library?
Informations about the package evolutioncms-snippets-ddmakehttprequest
(MODX)EvolutionCMS.snippets.ddMakeHttpRequest
Makes HTTP request to a given URL.
Supports redirects even if native CURL redirects is unavailable.
Requires
- PHP >= 5.6
- (MODX)EvolutionCMS.libraries.ddTools >= 0.48.2
Documentation
Installation
1. Elements → Snippets: Create a new snippet with the following data
- Snippet name:
ddMakeHttpRequest
. - Description:
<b>2.3.2</b> Makes HTTP request to a given URL.
. - Category:
Core
. - Parse DocBlock:
no
. - Snippet code (php): Insert content of the
ddMakeHttpRequest_snippet
file from the archive.
2. Elements → Manage Files
- Create a new folder
assets/snippets/ddMakeHttpRequest/
. - Extract the archive to the folder (except
ddMakeHttpRequest_snippet.php
).
Parameters description
-
url
- Desctription: The URL to fetch.
- Valid values:
string
- Required
-
method
- Desctription: Request type.
- Valid values:
'get'
'post'
- Default value:
'get'
-
postData
- Desctription: The full data to post in a HTTP “POST” operation.
- Valid values:
stringJsonObject
— as JSON objectstringHjsonObject
— as HJSONstringQueryFormated
— as Query stringstring
- It can also be set as a native PHP object or array (e. g. for calls through
\DDTools\Snippet::runSnippet
):arrayAssociative
object
- Default value: —
-
sendRawPostData
- Desctription: Send raw
postData
. E. g. if you need JSON in request payload. - Valid values:
0
1
- Default value:
0
- Desctription: Send raw
-
headers
- Desctription: An array of HTTP header fields to set.
- Valid values:
stringJsonArray
— as JSONstringHjsonArray
— as HJSONstringQueryFormated
— as Query string- It can also be set as a native PHP array (e. g. for calls through
\DDTools\Snippet::runSnippet
):array
- Default value: —
-
userAgent
- Desctription: The contents of the
User-Agent:
header to be used in a HTTP request. - Valid values:
string
- Default value: —
- Desctription: The contents of the
-
timeout
- Desctription: The maximum number of seconds for execute request.
- Valid values:
integer
- Default value:
60
-
proxy
- Desctription: Proxy server in format
[+protocol+]://[+user+]:[+password+]@[+ip+]:[+port+]
. E. g.http://user:[email protected]:5555
orsocks5://user:[email protected]:5555
. - Valid values:
string
- Default value: —
- Desctription: Proxy server in format
useCookie
- Desctription: Enagle cookies. The
assets/cache/ddMakeHttpRequest_cookie.txt
file is used. - Valid values:
0
1
- Default value:
0
- Desctription: Enagle cookies. The
Examples
Simple GET request
Simple POST request
Set data as JSON:
Or Query string:
Run the snippet through \DDTools\Snippet::runSnippet
without DB and eval
Links
All versions of evolutioncms-snippets-ddmakehttprequest with dependencies
PHP Build Version
Package Version
The package dd/evolutioncms-snippets-ddmakehttprequest contains the following files
Loading the files please wait ....