Guzzle PHP v5 Documentation// Base URI is used with relative requests 'base_uri' => 'http://httpbin.org', // You can set any number of default request options. 'timeout' => 2.0, ]); Clients are immutable in Guzzle examples on how a base_uri is resolved with another URI. base_uri URI Result http://foo.com /bar http://foo.com/bar base_uri URI Result http://foo.com/foo /bar http://foo.com/bar http://foo.com/foo bar even if some of them fail $results = Promise\settle($promises)->wait(); // You can access each result using the key provided to the unwrap // function. echo $results['image']['value']->getHeader('Content-Length')[0]0 码力 | 62 页 | 309.78 KB | 11 月前3
Guzzle PHP 6.5 Documentation// Base URI is used with relative requests 'base_uri' => 'http://httpbin.org', // You can set any number of default request options. 'timeout' => 2.0, ]); Clients are immutable in Guzzle examples on how a base_uri is resolved with another URI. base_uri URI Result http://foo.com /bar http://foo.com/bar base_uri URI Result http://foo.com/foo /bar http://foo.com/bar http://foo.com/foo bar String Parameters You can provide query string parameters with a request in several ways. You can set query string parameters in the request's URI: $response = $client->request('GET', 'http://httpbin0 码力 | 65 页 | 311.42 KB | 11 月前3
Guzzle PHP v5 DocumentationClient([ // Base URI is used with relative requests 'base_uri' => 'http://httpbin.org', // You can set any number of default request options. 'timeout' => 2.0, ]); Clients are immutable in Guzzle 6, which 3986? Here are some quick examples on how a base_uri is resolved with another URI. base_uri URI Result http://foo.com /bar http://foo.com/bar http://foo.com/foo /bar http://foo.com/bar http://foo.com/foo even if some of them fail $results = Promise\settle($promises)->wait(); // You can access each result using the key provided to the unwrap // function. echo $results['image']['value']->getHeader('Content-Length')[0]0 码力 | 49 页 | 231.08 KB | 11 月前3
Guzzle PHP 5.3 Documentationthrown. 1.2.3 Query String Parameters Sending query string parameters with a request is easy. You can set query string parameters in the request’s URL. $response = $client->get('http://httpbin.org?foo=bar'); $request = $client->createRequest('GET', 'http://httpbin.org'); $query = $request->getQuery(); $query->set('foo', 'bar'); // You can use the query string object like an array $query['baz'] = 'bam'; // The represented this way (e.g., Set-Cookie), you can pass an optional flag to the getHeader() method to retrieve the header values as an array. $values = $response->getHeader('Set-Cookie', true); foreach ($values0 码力 | 63 页 | 275.75 KB | 11 月前3
Guzzle PHP 5.3 Documentationthrown. Query String Parameters Sending query string parameters with a request is easy. You can set query string parameters in the request’s URL. $response = $client->get('http://httpbin.org?foo=bar'); $request = $client->createRequest('GET', 'http://httpbin.org'); $query = $request->getQuery(); $query->set('foo', 'bar'); // You can use the query string object like an array $query['baz'] = 'bam'; // The represented this way (e.g., Set-Cookie), you can pass an optional flag to the getHeader() method to retrieve the header values as an array. $values = $response->getHeader('Set-Cookie', true); foreach ($values0 码力 | 72 页 | 312.62 KB | 11 月前3
Guzzle PHP 7.0 Documentation// Base URI is used with relative requests 'base_uri' => 'http://httpbin.org', // You can set any number of default request options. 'timeout' => 2.0, ]); Clients are immutable in Guzzle examples on how a base_uri is resolved with another URI. base_uri URI Result http://foo.com /bar http://foo.com/bar base_uri URI Result http://foo.com/foo /bar http://foo.com/bar http://foo.com/foo bar String Parameters You can provide query string parameters with a request in several ways. You can set query string parameters in the request's URI: $response = $client->request('GET', 'http://httpbin0 码力 | 64 页 | 310.93 KB | 11 月前3
Guzzle PHP 6.5 DocumentationClient([ // Base URI is used with relative requests 'base_uri' => 'http://httpbin.org', // You can set any number of default request options. 'timeout' => 2.0, ]); Clients are immutable in Guzzle 6, which 3986? Here are some quick examples on how a base_uri is resolved with another URI. base_uri URI Result http://foo.com /bar http://foo.com/bar http://foo.com/foo /bar http://foo.com/bar http://foo.com/foo String Parameters You can provide query string parameters with a request in several ways. You can set query string parameters in the request’s URI: $response = $client->request('GET', 'http://httpbin0 码力 | 50 页 | 237.04 KB | 11 月前3
Guzzle PHP 7.0 DocumentationClient([ // Base URI is used with relative requests 'base_uri' => 'http://httpbin.org', // You can set any number of default request options. 'timeout' => 2.0, ]); Clients are immutable in Guzzle 6, which 3986? Here are some quick examples on how a base_uri is resolved with another URI. base_uri URI Result http://foo.com /bar http://foo.com/bar http://foo.com/foo /bar http://foo.com/bar http://foo.com/foo String Parameters You can provide query string parameters with a request in several ways. You can set query string parameters in the request’s URI: $response = $client->request('GET', 'http://httpbin0 码力 | 50 页 | 235.39 KB | 11 月前3
Falcon v3.1.1-b3 Documentationinstall [uvicorn|daphne|hypercorn] Note: By default, the uvicorn package comes only with a minimal set of pure-Python dependencies. For CPython- based production deployments, you can install Uvicorn along running pytest: $ cd falcon $ pip install -r requirements/tests $ pytest tests Or, to run the default set of tests: $ pip install tox && tox Tip: See also the tox.ini file for a full list of available environments get_param('q', True)} result = requests.get(url, params=params) resp.status = falcon.code_to_http_status(result.status_code) resp.content_type = result.headers['content-type'] resp.text = result.text class AuthMiddleware:0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-b1 Documentationinstall [uvicorn|daphne|hypercorn] Note: By default, the uvicorn package comes only with a minimal set of pure-Python dependencies. For CPython- based production deployments, you can install Uvicorn along running pytest: $ cd falcon $ pip install -r requirements/tests $ pytest tests Or, to run the default set of tests: $ pip install tox && tox Tip: See also the tox.ini file for a full list of available environments get_param('q', True)} result = requests.get(url, params=params) resp.status = falcon.code_to_http_status(result.status_code) resp.content_type = result.headers['content-type'] resp.text = result.text class AuthMiddleware:0 码力 | 378 页 | 1.29 MB | 1 年前3
共 80 条
- 1
- 2
- 3
- 4
- 5
- 6
- 8













