File: httprequest.xml

package info (click to toggle)
phing 3.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 9,868 kB
  • sloc: php: 59,850; xml: 9,713; sql: 78; makefile: 39; sh: 14
file content (46 lines) | stat: -rw-r--r-- 1,578 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?xml version="1.0" ?>
<project name="test for http-request task" default="recipient">
    <!-- Actual tasks will be copied here from other targets -->
    <target name="recipient" />

    <target name="missingURL">
        <http-request />
    </target>

    <target name="matchesRegexp">
        <http-request url="http://example.com/" responseRegex="foo" />
    </target>

    <target name="matchesCodeRegexp">
        <http-request url="http://example.com/" responseCodeRegex="200" />
    </target>

    <target name="doesNotMatchRegexp">
        <http-request url="http://example.com/" responseRegex="bar" />
    </target>

    <target name="post">
        <http-request url="http://example.com/form" method="POST">
            <postparameter name="foo" value="bar" />
            <postparameter name="baz" value="quux" />
        </http-request>
    </target>

    <target name="authentication">
        <http-request url="http://example.com/" authScheme="digest" authUser="luser" authPassword="secret" />
    </target>

    <target name="nested-tags">
        <http-request url="http://example.com">
            <config name="timeout" value="10" />
            <header name="user-agent" value="Phing HttpRequestTask" />
        </http-request>
    </target>

    <target name="config-properties">
        <property name="hostname" value="localhost" />
        <property name="phing.http.proxy" value="http://${hostname}:8080/" />
        <property name="phing.http.timeout" value="20" />
        <http-request url="http://example.com/foo.bar" />
    </target>
</project>