From 264c1b36c97e014250101dcaee22d3329a2fa30c Mon Sep 17 00:00:00 2001 From: Nic Waller Date: Sun, 14 Jul 2013 11:36:56 -0700 Subject: [PATCH] Include title parameter in the API example Title should be included as one of the post fields in the example so that people are aware of it, and also aware that NOT including it incurs a significant (10x) performance penalty. See related issue https://github.com/YOURLS/YOURLS/issues/1454 --- sample-remote-api-call.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sample-remote-api-call.txt b/sample-remote-api-call.txt index de2c1cc..cdf4bc1 100644 --- a/sample-remote-api-call.txt +++ b/sample-remote-api-call.txt @@ -31,6 +31,7 @@ curl_setopt($ch, CURLOPT_POST, 1); // This is a POST request curl_setopt($ch, CURLOPT_POSTFIELDS, array( // Data to POST 'url' => $url, 'keyword' => $keyword, + 'title' => $keyword, // If omitted, Yourls will lookup TITLE with an HTTP request 'format' => $format, 'action' => 'shorturl', 'username' => $username, @@ -44,4 +45,4 @@ curl_close($ch); // Do something with the result. Here, we just echo it. echo $data; -?> \ No newline at end of file +?> -- 2.45.0