Results: 1580
Notes
  • Newest first
  • Oldest first
  • Newest first(All)
  • Oldest first(All)
check if the key exists in the response JSON
Tests that key
text
exists in the response JSON
pm.test("status text key exists", function () {
    var jsonData = pm.response.json();
    pm.expect(jsonData.status.text !== undefined).to.eql(true);
});
The response JSON
{
    "status": {
        "code": 400,
        "text": "Mobile Number is required"
    }
}
by Valeri Tandilashvili
4 years ago
0
Postman
postman tests
0
check the response HTTP status code
Tests that the response HTTP
status code
is equal to
400
pm.test("Status code is 400", function () {
    pm.response.to.have.status(400);
});
by Valeri Tandilashvili
4 years ago
0
Postman
postman tests
0
check if the property exists in the response JSON
Tests that the property
status
exists in the response JSON
pm.test('Has "status" property', function() {
    var jsonData = pm.response.json();
    pm.expect(jsonData).to.have.property('status');
});
The response JSON
{
    "status": {
        "code": 400,
        "text": "Mobile Number is required"
    }
}
by Valeri Tandilashvili
4 years ago
0
Postman
postman tests
0
check if the response includes certain header
Tests that the response includes header:
Content-Type
pm.test("Content-Type is application/json", function () {
    pm.response.to.have.header("Content-Type");
});
by Valeri Tandilashvili
4 years ago
0
Postman
postman tests
0
check response header value
Tests that the header
Content-Type
is equal to
application/json; charset=utf-8
pm.test("Content-Type is application/json", function () {
    pm.response.to.be.header("Content-Type", "application/json; charset=utf-8");
});
by Valeri Tandilashvili
4 years ago
0
Postman
postman tests
0
<?php $cars=array("Volvo","BMW","Toyota"); echo count($cars); ?>
by გიორგი ბაკაშვილი
4 years ago
0
PHP
Array
PHP official doc
0
Check that variable is an array
<?php
$yes = array('this', 'is', 'an array');

echo is_array($yes) ? 'Array' : 'not an Array';
echo "\n";

$no = 'this is a string';

echo is_array($no) ? 'Array' : 'not an Array';
?>
by გიორგი ბაკაშვილი
4 years ago
0
PHP
Array
PHP official doc
0
Search for the value "Glenn" in an array and output some text:
<?php
$people = array("Peter", "Joe", "Glenn", "Cleveland");

if (in_array("Glenn", $people))
  {
  echo "Match found";
  }
else
  {
  echo "Match not found";
  }
?>
by გიორგი ბაკაშვილი
4 years ago
0
PHP
Array
PHP official doc
0
Gives permission to
services_cron/asb/log
to create files and write logs
sudo chmod -R 757 /var/www/html/services_cron/asb/log
by Valeri Tandilashvili
4 years ago
0
Linux
permissions
0
Output the result of serialized form values: example:
FirstName=Mickey&LastName=Mouse
$( "form" ).on( "submit", function( event ) {
  event.preventDefault();
  console.log( $( this ).serialize() );
});
by Luka Tatarishvili
4 years ago
0
JavaScript
functions
0
Results: 1580