formDin icon indicating copy to clipboard operation
formDin copied to clipboard

REST: Criar cliente PHP

Open bjverde opened this issue 5 years ago • 2 comments

Criar cliente PHP para comunicar com API

  • [ ] Simples
  • [ ] Basic
  • [ ] JWT

Está relacionado com:

  • https://github.com/bjverde/formDin/issues/129
  • bjverde/sysgen#59

bjverde avatar Mar 07 '20 17:03 bjverde

Documentação

  • https://ourcodeworld.com/articles/read/674/top-7-best-php-http-client-libraries
  • https://stackoverflow.com/questions/9802788/call-a-rest-api-in-php
  • https://hackernoon.com/creating-rest-api-in-php-using-guzzle-d6a890499b02
  • https://medium.com/better-programming/json-web-tokens-vs-session-cookies-for-authentication-55a5ddafb435

bjverde avatar Mar 09 '20 01:03 bjverde

Testando guzzlehttp/guzzle

Package operations: 4 installs, 6 updates, 1 removal
  - Removing container-interop/container-interop (1.2.0)
  - Updating phpmailer/phpmailer (v6.0.7 => v6.1.4): Loading from cache
  - Updating components/font-awesome (5.9.0 => 5.12.1): Downloading (100%)
  - Updating pimple/pimple (v3.2.3 => v3.3.0): Downloading (100%)
  - Updating slim/slim (3.12.2 => 3.12.3): Downloading (100%)
  - Updating firebase/php-jwt (v5.0.0 => v5.1.0): Downloading (100%)
  - Updating psr/log (1.1.0 => 1.1.2): Loading from cache
  - Installing ralouphie/getallheaders (3.0.3): Downloading (100%)
  - Installing guzzlehttp/psr7 (1.6.1): Downloading (100%)
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)
  - Installing guzzlehttp/guzzle (6.5.2): Downloading (100%)
guzzlehttp/psr7 suggests installing zendframework/zend-httphandlerrunner (Emit PSR-7 responses)
Writing lock file
Generating autoload files
  • https://markoivancic.from.hr/set-the-authorization-bearer-header-in-guzzle-http-client/
  • https://stackoverflow.com/questions/36011790/guzzle-http-add-authorization-header-directly-into-request
  • https://stackoverflow.com/questions/54785234/use-guzzle-in-laravel-to-access-wordpress-api-using-jwt-auth-plugin-response-ha
  • https://stackoverflow.com/questions/50879529/guzzle-post-request-to-jwt-api-get-unauthorized-while-postman-is-working?rq=1
  • https://stackoverflow.com/questions/37704274/jwt-authentication-in-laravel-without-database
  • https://markoivancic.from.hr/set-the-authorization-bearer-header-in-guzzle-http-client/

bjverde avatar Mar 09 '20 04:03 bjverde