mwinteringham / restful-booker Goto Github PK
View Code? Open in Web Editor NEWA free to use Web API for practising API testing on
Home Page: https://automationintesting.com/training/apitesting/
License: GNU General Public License v3.0
A free to use Web API for practising API testing on
Home Page: https://automationintesting.com/training/apitesting/
License: GNU General Public License v3.0
The response from the API is (something like):
{"token":"4435e80661e070c"}
whereas the documentation simply states the response should be (something like):
VHgTAuGPxvMsH1p
Hi there! Great work, I came across this repository today and it looks great.
This issue might not be an issue at all. As far as I understand, the API hosted on herokuapp can be used for learning purpose and I can even authenticate myself to the API to add new entries (which will be cleared every ten minutes).
I tried to authenticate with the username and password given in the documentation but server responses with the message that credentials are wrong. Did I misunderstand? Authentication is possible only when I will build the API on my device or it is able through the web too?
Hi when i do a get at https://restful-booker.herokuapp.com/booking/1
I get as response a 418 with the message "I'm a Teapot"
Can you fix this cause i expect to get a booking with all the information.
It's currently adding in spurious ] brackets and rendering <token_value> as HTML
After cloning the project I tried it both with Docker and NodeJS.
Error message of Docker:
C:\local\restful-booker (master)
λ docker-compose build
Building restful-booker
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "compose\cli\main.py", line 64, in main
File "compose\cli\main.py", line 116, in perform_command
File "compose\cli\main.py", line 222, in build
File "compose\project.py", line 307, in build
File "compose\service.py", line 786, in build
File "site-packages\docker\api\build.py", line 205, in build
File "site-packages\docker\utils\decorators.py", line 47, in inner
File "site-packages\docker\api\client.py", line 171, in _post
File "site-packages\requests\sessions.py", line 522, in post
File "site-packages\requests\sessions.py", line 475, in request
File "site-packages\requests\sessions.py", line 596, in send
File "site-packages\requests\adapters.py", line 423, in send
File "site-packages\requests\packages\urllib3\connectionpool.py", line 595, in urlopen
File "site-packages\requests\packages\urllib3\connectionpool.py", line 363, in _make_request
File "httplib.py", line 1042, in request
File "httplib.py", line 1082, in _send_request
File "httplib.py", line 1038, in endheaders
File "httplib.py", line 882, in _send_output
File "httplib.py", line 844, in send
File "site-packages\docker\transport\npipeconn.py", line 31, in connect
File "site-packages\docker\transport\npipesocket.py", line 22, in wrapped
File "site-packages\docker\transport\npipesocket.py", line 50, in connect
pywintypes.error: (2, 'WaitNamedPipe', 'The system cannot find the file specified.')
docker-compose returned -1
Error message of NodeJS (before that i did "npm install"):
C:\local\restful-booker (master)
λ npm start
> [email protected] start C:\local\restful-booker
> node ./bin/www
events.js:163
throw er; // Unhandled 'error' event
^
MongoError: failed to connect to server [localhost:27017] on first connect [MongoError: connect ECONNREFUSED 127.0.0.1:27017]
at Pool.<anonymous> (C:\local\restful-booker\node_modules\mongodb-core\lib\topologies\server.js:328:35)
at emitOne (events.js:96:13)
at Pool.emit (events.js:191:7)
at Connection.<anonymous> (C:\local\restful-booker\node_modules\mongodb-core\lib\connection\pool.js:274:12)
at Object.onceWrapper (events.js:293:19)
at emitTwo (events.js:106:13)
at Connection.emit (events.js:194:7)
at Socket.<anonymous> (C:\local\restful-booker\node_modules\mongodb-core\lib\connection\connection.js:177:49)
at Object.onceWrapper (events.js:293:19)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at emitErrorNT (net.js:1283:8)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "C:\\local\\node-win-x64\\node.exe" "C:\\local\\node-win-x64\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v7.9.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: `node ./bin/www`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script 'node ./bin/www'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the restful-booker package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./bin/www
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs restful-booker
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls restful-booker
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\tx2mz\AppData\Roaming\npm-cache\_logs\2017-04-27T10_48_26_225Z-debug.log
:(
As of the most recent commit, bookingdates are getting saved as one day later than what was input. I'm assuming it has to do with updating dateformat dependency, but it is all javascript to me. :)
Hi There,
Is this documentation (https://automationintesting.online/booking/swagger-ui.html#) correct and up to date?
The https://automationintesting.online/auth/ endpoint returns 404.
I am trying to delete a created booking but there is no way to create an access token and passing the cookie to the delete endpoint also returns 403.
Any help is appreciated. Thanks!
Hello Mark,
I'm trying to get the API running on my Windows 10 Machine, I installed the MongoDB first as suggested.
After that I installed NPM.
I cloned the repository, executed mongod, npm install, npm start
commands. I've not received any error messages.
I can open the http://localhost:3001/ in my browser and it shows the same page as on the herokuapp.
But when I try to execute the GET command on http://localhost:3001/ping in Postman, I get an HTTP 404 error.
POST //auth 404 17.347 ms - 9
Error: Not Found
at C:\Users\Gabor_Zorad\Work\restful-booker-main\app.js:23:15
at Layer.handle [as handle_request] (C:\Users\Gabor_Zorad\Work\restful-booker-main\node_modules\express\lib\router\layer.js:95:5)
at trim_prefix (C:\Users\Gabor_Zorad\Work\restful-booker-main\node_modules\express\lib\router\index.js:328:13)
at C:\Users\Gabor_Zorad\Work\restful-booker-main\node_modules\express\lib\router\index.js:286:9
at Function.process_params (C:\Users\Gabor_Zorad\Work\restful-booker-main\node_modules\express\lib\router\index.js:346:12)
at next (C:\Users\Gabor_Zorad\Work\restful-booker-main\node_modules\express\lib\router\index.js:280:10)
at C:\Users\Gabor_Zorad\Work\restful-booker-main\node_modules\express\lib\router\index.js:646:15
at next (C:\Users\Gabor_Zorad\Work\restful-booker-main\node_modules\express\lib\router\index.js:265:14)
at Function.handle (C:\Users\Gabor_Zorad\Work\restful-booker-main\node_modules\express\lib\router\index.js:175:3)
at router (C:\Users\Gabor_Zorad\Work\restful-booker-main\node_modules\express\lib\router\index.js:47:12) {
status: 404
}
Do you know what can cause this issue?
If I just open the http://localhost:3001/ping in Chrome, it works perfectly fine.
Thanks in advance!
The description for the DeleteBooking endpoint is a copy of the GetBookingIds endpoint.
restful-booker/public/apidoc/api_data.js
Line 281 in a79019c
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.