Closed QuincyLarson closed 7 years ago
boilerplate: https://hyperdev.com/#!/project/pastoral-caution working demo: https://hyperdev.com/#!/project/thread-paper
GET [project_url]/api/shorturl/:url_id
to redirect to the url corresponding to :url_id
POST [project_url]/api/shorturl/new
to create a new url[project_url]/api/shorturl/new
and I will receive a shortened URL in the JSON response. Example : {"original_url":"www.google.com","short_url":1}
http(s)://www.example.com(/more/routes)
format, the JSON response will contain an error like {"error":"invalid URL"}
. HINT: to be sure that the submitted url points to a valid site you can use the function dns.lookup(host, cb)
from the dns
core module.@QuincyLarson should we go with POST ? If we use many boilerplates I can create a form in the main view.
@Greenheart feel free add your thoughts.
After reading up on this, I think we should use POST to follow conventions.
@Em-Ant I read the referenced issue. Have you solved how campers should test their API for this project? :)
tisdag 22 november 2016 skrev Emanuele Antonelli notifications@github.com:
@QuincyLarson https://github.com/QuincyLarson should we go with POST ? If we use many boilerplates I can create a form in the main view.
@Greenheart https://github.com/Greenheart feel free add your thoughts.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/FreeCodeCamp/CurriculumExpansion/issues/80#issuecomment-262223431, or mute the thread https://github.com/notifications/unsubscribe-auth/AF12Kfm6pPbsHxAmDd395aWKeSe6CDqJks5rAtmCgaJpZM4K3XN3 .
I was thinking to test the redirection using another hyperdev server .
The steps could be :
window.shortUrl
)Check out the last tests on narrow-plane. I implemented a draft version of this process.
@QuincyLarson @BerkeleyTrue if we use the worflow explained above, the 2 steps need to be executed sequentially. Does our system support serial ajax calls (not parallel) ?
@Em-Ant @BerkeleyTrue said as long as when a request completes, it resolves a promise, these ajax calls can be run serially. Does this answer your question?
@Em-Ant Nice idea!
onsdag 23 november 2016 skrev Quincy Larson notifications@github.com:
@Em-Ant https://github.com/Em-Ant @BerkeleyTrue https://github.com/BerkeleyTrue said as long as when a request completes, it resolves a promise, these ajax calls can be run serially. Does this answer your question?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/FreeCodeCamp/CurriculumExpansion/issues/80#issuecomment-262430585, or mute the thread https://github.com/notifications/unsubscribe-auth/AF12KaBOWceymDmv-6wFc_HsiGfitfwNks5rA7qXgaJpZM4K3XN3 .
@QuincyLarson if the ajax call can be run serially I think it should be ok. Thanks.
OK - cool. Please let me know if I can help with anything else. My goal is to keep you all unblocked so you can keep making steady progress with this 🙂
This should be ready to QA.
boilerplate: https://hyperdev.com/#!/project/pastoral-caution working demo: https://hyperdev.com/#!/project/thread-paper
testing with narrow-plane, option MS3-url shortener
.
notes :
Forum thread for QA'ing this is live here: https://forum.freecodecamp.com/t/url-shortener-project-with-testable-user-stories-guinea-pigs-needed/60782
Thanks for your help everyone! This is being QA'd and discussed.
I'm closing this issue. If anyone wants to discuss these further, please reopen it.
We are updating the API and Microservice projects to be testable. Campers will start with a boilerplate specific to each project.
Here some proposed user stories - feel free to expand upon them by replying to this comment, and if you see any that look unnecessary, please say so: (to be added)
Progress: