Guzzle PHP 6.5 Documentationest('GET', 'http://httpbin.org'); $promise = $client->sendAsync($request)->then(function ($response) { echo 'I completed! ' . $response->getBody(); }); $promise->wait(); User Guide Overview Requirements a Psr7\Http\Message\RequestInterface and array of transfer options, and must return a GuzzleHttp\Promise\PromiseInterface that is fulfilled with a Psr7\Http\Message\ResponseInterface on success. ... (mixed) client: $promise = $client->getAsync('http://httpbin.org/get'); $promise = $client->deleteAsync('http://httpbin.org/delete'); $promise = $client->headAsync('http://httpbin.org/get'); $promise = $clien0 码力 | 65 页 | 311.42 KB | 11 月前3
Guzzle PHP 7.0 Documentationest('GET', 'http://httpbin.org'); $promise = $client->sendAsync($request)->then(function ($response) { echo 'I completed! ' . $response->getBody(); }); $promise->wait(); User Guide Overview Requirements a Psr7\Http\Message\RequestInterface and array of transfer options, and must return a GuzzleHttp\Promise\PromiseInterface that is fulfilled with a Psr7\Http\Message\ResponseInterface on success. ... (mixed) client: $promise = $client->getAsync('http://httpbin.org/get'); $promise = $client->deleteAsync('http://httpbin.org/delete'); $promise = $client->headAsync('http://httpbin.org/get'); $promise = $clien0 码力 | 64 页 | 310.93 KB | 11 月前3
Guzzle PHP v5 Documentationest('GET', 'http://httpbin.org'); $promise = $client->sendAsync($request)->then(function ($response) { echo 'I completed! ' . $response->getBody(); }); $promise->wait(); User Guide Overview Requirements a Psr7\Http\Message\RequestInterface and array of transfer options, and must return a GuzzleHttp\Promise\PromiseInterface that is fulfilled with a Psr7\Http\Message\ResponseInterface on success. handler client: $promise = $client->getAsync('http://httpbin.org/get'); $promise = $client->deleteAsync('http://httpbin.org/delete'); $promise = $client->headAsync('http://httpbin.org/get'); $promise = $clien0 码力 | 62 页 | 309.78 KB | 11 月前3
Guzzle PHP 5.3 Documentationproviding the future request option to a request, you can send requests asynchronously using the promise interface of a future response. $client->get('http://httpbin.org', ['future' => true]) ->then(function tureResponse object that has not yet completed. Once you have a future response, you can use a promise object obtained by calling the then method of the response to take an action when the response has Handling Handling errors with future response object promises is a bit different. When using a promise, exceptions are forwarded to the $onError function provided to the second argument of the then()0 码力 | 72 页 | 312.62 KB | 11 月前3
Celery 2.0 Documentationthe first instance that returns a value for the given method. The list can also contain promises (promise.) celery.utils.fun_takes_kwargs(fun, kwlist=[]) With a function, and a list of keyword arguments missing attributes instead of raising AttributeError. celery.utils.maybe_promise(value) Evaluates if the value is a promise. celery.utils.mitemgetter(*items) Like operator.itemgetter() but returns *args, **kwargs) Memoized promise. The function is only evaluated once, every subsequent access will return the same value. evaluated Set to to True after the promise has been evaluated. evaluate()0 码力 | 284 页 | 332.71 KB | 1 年前3
PyWebIO v1.3.2 Documentationis a promise [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Promise], eval_js() will wait for the promise to resolve and return the value of it. When the promise is rejected return promise. current_url = eval_js("window.location.href") function_res = eval_js('''(function(){ var a = 1; a += b; return a; })()''', b=100) promise_res = eval_js('''new Promise(resolve with ipython rich output. Add group and outline parameters in put_buttons(). session module Add promise support in eval_js(). Support config input panel via set_env(). platform module Add support for0 码力 | 133 页 | 7.44 MB | 1 年前3
PyWebIO v1.3.0 Documentationis a promise [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Promise], eval_js() will wait for the promise to resolve and return the value of it. When the promise is rejected return promise. current_url = eval_js("window.location.href") function_res = eval_js('''(function(){ var a = 1; a += b; return a; })()''', b=100) promise_res = eval_js('''new Promise(resolve with ipython rich output. Add group and outline parameters in put_buttons(). session module Add promise support in eval_js(). Support config input panel via set_env(). platform module Add support for0 码力 | 133 页 | 7.44 MB | 1 年前3
PyWebIO v1.4.0 Documentationis a promise [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Promise], eval_js() will wait for the promise to resolve and return the value of it. When the promise is rejected b'hello world!')) Parameters: Example: Changed in version 1.3: The JS expression support return promise. pywebio.session.register_thread(thread: threading.Thread) Register the thread so that PyWebIO = eval_js('''(function(){ var a = 1; a += b; return a; })()''', b=100) promise_res = eval_js('''new Promise(resolve => { setTimeout(() => { resolve('Returned inside callback.');0 码力 | 135 页 | 7.45 MB | 1 年前3
PyWebIO v1.3.1 Documentationis a promise [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Promise], eval_js() will wait for the promise to resolve and return the value of it. When the promise is rejected return promise. current_url = eval_js("window.location.href") function_res = eval_js('''(function(){ var a = 1; a += b; return a; })()''', b=100) promise_res = eval_js('''new Promise(resolve with ipython rich output. Add group and outline parameters in put_buttons(). session module Add promise support in eval_js(). Support config input panel via set_env(). platform module Add support for0 码力 | 133 页 | 7.44 MB | 1 年前3
PyWebIO v1.3.3 Documentationis a promise [https://developer.mozilla.org/en- US/docs/Web/JavaScript/Reference/Global_Objects/Promise], eval_js() will wait for the promise to resolve and return the value of it. When the promise is rejected return promise. current_url = eval_js("window.location.href") function_res = eval_js('''(function(){ var a = 1; a += b; return a; })()''', b=100) promise_res = eval_js('''new Promise(resolve with ipython rich output. Add group and outline parameters in put_buttons(). session module Add promise support in eval_js(). Support config input panel via set_env(). platform module Add support for0 码力 | 133 页 | 7.44 MB | 1 年前3
共 174 条
- 1
- 2
- 3
- 4
- 5
- 6
- 18













