-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds protocol support to make-domain-requester #22
Conversation
Hmmm, the tests pass but there seems to be an issue with coveralls? |
Rather than adding an option to |
Not sure why Coveralls is failing, and the Travis racket versions need to be updated anyways. I'll look into that next time I get a chance. |
@jackfirth that makes sense. Pushed up a new commit adding |
(wrap-requester-location | ||
(domain+relative-path->http-url "http" domain _) requester)) | ||
|
||
(define (make-https-requester domain requester) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think make-https-requester
shouldn't work with a domain and should only change the URL of requests made with the underlying requester to HTTPS. Something like (wrap-requester-location http-url->https-url requester)
.
Okay I think this follows along with what you suggested: (make-domain-requester domain (make-https-requester http-requester)) Also updated the tests and added the |
@@ -15,5 +15,5 @@ before_install: | |||
install: raco pkg install --deps search-auto $TRAVIS_BUILD_DIR | |||
|
|||
script: | |||
- raco test $TRAVIS_BUILD_DIR | |||
- raco test --submodule integration-test $TRAVIS_BUILD_DIR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You'll need two test commands, the original one that runs unit tests and this one to run integration tests. Otherwise any (module+ test body ...) forms elsewhere in the package won't run. I haven't actually written any tests though, so technically not a big deal.
This looks great 👍 Thanks for sticking with it through review, and thanks for implementing this! Would you be willing to write some docs for it? I'll try and fix the travis/coveralls issues tonight. |
This has been great, a nice lesson in composition for sure. Will write up some docs tonight. I've also been working on a Thank again! |
If you'd like I can assign #12 to you then, json requesters has been on my list for some time. |
Pushed up docs for |
Merged #23, fixed cover and now it builds on more versions. You'll have to rebase. |
Nice to see the tests run against so many different Rackets. |
When setting up a domain-requester you can pass the optional
#:protocol
keyword to enable HTTPS URLs. The default remains HTTP.Example: