Files
cloud-cap-samples/reviewed/test/requests.http
Daniel Hutzel d0d08b1ee1 Enable authorizations w/ dummy-auth (#158)
* Enable authorizations w/ dummy-auth

* fixed: some tests run in privileged mode

* Fixed tests to skip auth

* npm test --silent

* Added dependency to passport
2020-11-12 23:56:04 +01:00

47 lines
1.0 KiB
HTTP

@me = {{$processEnv USER}}:
@bookshop = http://localhost:4004
@reviews-service = {{bookshop}}/reviews
# @reviews-service = http://localhost:5005/reviews
#################################################
#
# To ReviewsService
#
# move the right down:
### Get all reviews
GET {{reviews-service}}/Reviews
### Add a new review (with random rating)
POST {{reviews-service}}/Reviews
Content-Type: application/json;IEEE754Compatible=true
Authorization: Basic {{me}}
{"subject":"201", "title":"boo"}
#################################################
#
# Bookshop Requests involving reviews
# (both in-process as well as separate one)
#
### Request to CatalogService > delegated to ReviewsService
GET {{bookshop}}/browse/Books(201)/reviews?
&$select=rating,date,reviewer,title
### Alternative OData URL
GET {{bookshop}}/browse/Books/201/reviews?
&$select=rating,date,title
&$top=3
###
GET {{bookshop}}/browse/Books(201)?
&$select=ID,title,rating
&$expand=reviews
# Note: the $expand only works in case of ReviewsService in same process