PHP Classes

File: requests.http

Recommend this page to a friend!
  Classes of Leonardo Di Sarli   Ala PHP API Micro-Framework   requests.http   Download  
File: requests.http
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Ala PHP API Micro-Framework
Generate base code for API using a query builder
Author: By
Last change: improve patterns and add more tests
Date: 1 year ago
Size: 1,568 bytes
 

Contents

Class file image Download
@token = 32c5a206ee876f4c6e1c483457561dbed02a531a89b380c3298bb131a844ac3c @secret = a1c5930d778e632c6684945ca15bcf3c752d17502d4cfbd1184024be6de14540 @context = app-test @domain = sample # @name health_check GET http://localhost:8101/health HTTP/1.1 Content-type: application/json Accept: application/json ### # @name generate_token POST http://localhost:8101/auth/generate HTTP/1.1 Content-type: application/json Accept: application/json { "token": "{{token}}", "secret": "{{secret}}", "context": "{{context}}" } ### @jwt = {{generate_token.response.body.$.response.token}} # @name add POST http://localhost:8101/{{domain}}/add HTTP/1.1 Content-type: application/json Accept: application/json Authorization: {{jwt}} Context: app-test { "field": "test" } ### # @name list GET http://localhost:8101/{{domain}}/list HTTP/1.1 Content-type: application/json Accept: application/json Authorization: {{jwt}} Context: app-test ### # @name dead_list GET http://localhost:8101/{{domain}}/dead_list HTTP/1.1 Content-type: application/json Accept: application/json Authorization: {{jwt}} Context: app-test ### @ulid = {{list.response.body.response.data[0].id}} # @name detail GET http://localhost:8101/{{domain}}/detail/{{ulid}} HTTP/1.1 Content-type: application/json Accept: application/json Authorization: {{jwt}} Context: app-test ### # @name bulk POST http://localhost:8101/{{domain}}/bulk HTTP/1.1 Content-type: application/json Accept: application/json Authorization: {{jwt}} Context: app-test { "ids" : [ "{{ulid}}" ] } ###