channsoung

CITYBUS_SAMPLE

Sep 12th, 2017
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. -----USING CURL REQUEST---------
  2.  
  3. 1. REQUEST TOKEN
  4. curl -X POST http://110.74.218.219:8080/RestEngine/oauth/token -H 'content-type: application/x-www-form-urlencoded' -d 'username=citybus&password=ba0228f6e48ba7942d79e2b44e6072ee&grant_type=password&client_id=third_party&client_secret=16681c9ff419d8ecc7cfe479eb02a7a&scope=trust'
  5.  
  6. 2. BUS PAYMENT
  7. curl -X POST http://110.74.218.219:8080/RestEngine/api/v1/citybus/commit -H 'authorization: Bearer 5bd9f19b-2be3-4102-8587-7893cd9ab818' -H 'content-type: application/json' -d '{
  8. "bus_id": "550001",
  9. "wing_account": "00047461",
  10. "transaction_time": "20170901010100"
  11. }'
  12.  
  13.  
  14.  
  15.  
  16. -----USING HTTP REQUEST---------
  17. 1. REQUEST TOKEN
  18.  
  19. POST /RestEngine/oauth/token HTTP/1.1
  20. Host: localhost:8081
  21. Content-Type: application/x-www-form-urlencoded
  22. username=citybus&password=ba0228f6e48ba7942d79e2b44e6072ee&grant_type=password&client_id=third_party&client_secret=16681c9ff419d8ecc7cfe479eb02a7a&scope=trust
  23.  
  24.  
  25. 2. BUS PAYMENT
  26. POST /RestEngine/api/v1/citybus/commit HTTP/1.1
  27. Host: localhost:8081
  28. Authorization: Bearer 5bd9f19b-2be3-4102-8587-7893cd9ab818
  29. Content-Type: application/json
  30.  
  31. {
  32. "bus_id": "550001",
  33. "wing_account": "00047461",
  34. "transaction_time": "20170901010100"
  35. }
Add Comment
Please, Sign In to add comment