Browse Source

Updated the user agent string

main
Cédric Belin 2 months ago
parent
commit
43a6e4125f
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      share/api.http
  2. +2
    -1
      test/ClientTest.php

+ 1
- 1
share/api.http View File

@@ -6,7 +6,7 @@
POST {{baseUrl}}/comment-check
Content-Type: application/x-www-form-urlencoded

blog=https%3A%2F%2Fdev.belin.io%2Fyii2-akismet&comment_author=Akismet&comment_author_url=https%3A%2F%2Fdev.belin.io%2Fyii2-akismet&comment_content=I'm%20testing%20out%20the%20Service%20API.&comment_type=comment&is_test=true&referrer=https%3A%2F%2Fpackagist.org%2Fpackages%2Fcedx%2Fyii2-akismet&user_agent=Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64%3B%20rv%3A70.0)%20Gecko%2F20100101%20Firefox%2F70.0&user_ip=192.168.0.1&user_role=administrator
blog=https%3A%2F%2Fdev.belin.io%2Fyii2-akismet&comment_author=Akismet&comment_author_url=https%3A%2F%2Fdev.belin.io%2Fyii2-akismet&comment_content=I'm%20testing%20out%20the%20Service%20API.&comment_type=comment&is_test=true&referrer=https%3A%2F%2Fpackagist.org%2Fpackages%2Fcedx%2Fyii2-akismet&user_agent=Mozilla%2F5.0%20(Windows%20NT%2010.0%3B%20Win64%3B%20x64)%20AppleWebKit%2F537.36%20(KHTML%2C%20like%20Gecko)%20Chrome%2F83.0.4103.97%20Safari%2F537.36%20Edg%2F83.0.478.45&user_ip=192.168.0.1&user_role=administrator

###



+ 2
- 1
test/ClientTest.php View File

@@ -75,7 +75,8 @@ class ClientTest extends TestCase {
"isTest" => true
]);

$author = new Author("192.168.0.1", "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0", [
$userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36 Edg/83.0.478.45";
$author = new Author("192.168.0.1", $userAgent, [
"name" => "Akismet",
"role" => "administrator",
"url" => new Uri("https://dev.belin.io/yii2-akismet")


Loading…
Cancel
Save