Skip to content

Instantly share code, notes, and snippets.

@marcelodeandrade
Created January 27, 2019 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marcelodeandrade/689f58220f72439698bba544503d15ef to your computer and use it in GitHub Desktop.
Save marcelodeandrade/689f58220f72439698bba544503d15ef to your computer and use it in GitHub Desktop.
Response example
<?php
header('Content-Type: application/json');
header('HTTP/1.1 401 Unauthorized');
$data = [
'status' => 401,
'message' => '401 Unauthorized'
];
echo json_encode($data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment