mirror of
https://github.com/guzzle/guzzle.git
synced 2025-02-26 19:15:10 +01:00
1. Adopting a marker interface for Guzzle exceptions. A. All exceptions emitted from Guzzle are now wrapped with a Guzzle namespaced exception. B. Guzzle\Common\GuzzleExceptionInterface was renamed to Guzzle\Common\GuzzleException C. Guzzle\Common\ExceptionCollection was renamed to Guzzle\Common\Exception\ExceptionCollection 2. Using Header objects for Request and Response objects A. When you call $request->getHeader('X'), you will get back a Guzzle\Http\Message\Header object that contains all of the headers that case insensitively match. This object can be cast to a string or iterated like an array. You can pass true in the second argument to retrieve the header as a string. B. Removing the old Guzzle\Common\Collection based searching arguments from most of the request and response header methods. All retrievals are case-insensitive and return Header objects. 3. Changing the two headers added by the cache plugin to just one header with key and ttl. 4. Changing Guzzle\Http\Message\Response::factory() to fromMessage(). 5. Removing the NullObject return value from ServiceDescriptions and instead simply returning null New Features / enhancements: 1. Adding Guzzle\Http\Message\AbstractMessage::addHeaders() 2. Making it simpler to create service descriptions using a unified factory method that delegates to other factories. 3. Better handling of ports and hosts in Guzzle\Http\Url Note: This is a noisy diff because I'm removing trailing whitespace and adding a new line at the end of each source file.
56 lines
2.5 KiB
XML
56 lines
2.5 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<client>
|
|
|
|
<!-- Include other XML documents -->
|
|
<includes>
|
|
<include path="test_service2.xml" />
|
|
</includes>
|
|
|
|
<!-- Define custom constraints -->
|
|
<types>
|
|
<type name="custom_filter" class="Symfony.Component.Validator.Constraints.Regex" />
|
|
<!-- Adds a shortcut for a RegEx filter -->
|
|
<type name="slug" class="Symfony.Component.Validator.Constraints.Regex" pattern="/[0-9a-zA-z_\-]+/" />
|
|
</types>
|
|
|
|
<!-- Add commands to the service -->
|
|
<commands>
|
|
|
|
<command name="test" method="DELETE" uri="{{ bucket }}/{{ key }}{{ format }}" min_args="2">
|
|
<doc>Documentation</doc>
|
|
<param name="format" required="false" default="json" type="choice:json,xml" location="path" prepend="." />
|
|
<param name="bucket" required="true" location="path" doc="Bucket location" />
|
|
<param name="key" required="true" location="path"/>
|
|
<param name="query" location="query" default="123" />
|
|
<param name="query_d" location="query" default="abc" required="true"/>
|
|
</command>
|
|
|
|
<command name="search" method="GET">
|
|
<param name="q" type="string" required="true"/>
|
|
<param name="locale" type="string" required="false" filters="strtolower" />
|
|
<param name="rpp" type="integer" required="false"/>
|
|
<param name="page" type="integer" required="false"/>
|
|
<param name="since_id" type="integer" required="false"/>
|
|
<param name="until" type="date" required="false"/>
|
|
<param name="show_user" type="boolean" required="false"/>
|
|
<param name="result_type" type="string" required="false"/>
|
|
</command>
|
|
|
|
<command name="trends.location" method="GET" min_args="1" uri="/trends/{{ woeid }}">
|
|
<param name="woeid" type="integer" required="true" location="path" />
|
|
<param name="acl" required="true" location="header:X-Amz-Acl" />
|
|
</command>
|
|
|
|
<command name="geo.id" method="GET" auth_required="true" uri="/geo/id/{{ place_id }}">
|
|
<param name="place_id" type="string" required="true" prepend="/" append=".id" />
|
|
<!-- The request builder will remove '//', so it's okay to always prepend / if needed -->
|
|
<param name="second" type="string" required="true" prepend="/" />
|
|
</command>
|
|
|
|
<command name="path" method="GET" uri="/test" />
|
|
|
|
<command name="concrete" extends="abstract" />
|
|
|
|
</commands>
|
|
</client>
|