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
URLService proposed improvements #179
Conversation
* Generate a 'service' URL | ||
* This implementation understands a serviceSpec in the form | ||
* {actionName: string} | ||
*/ |
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.
missing 3 @param
Hello Antoine, the code seems to be ok, but the travis build is broken.
Do you happen to have any unit test? |
I tried to take into account all comments. Two issues I have :
|
Hello, if you want to experiment with unit testing you can now have a look at CONTRIBUTING and test/README. |
I wrote the unit test and fixed some bugs. Waiting for apicolet to merge in the changes.. |
- now modules can pass a full 'service specification' structure, instead of a raw actionName string, to be used by the URLService to determine the request - URLService can now return a structured 'request details' instead of a raw URL, which can contain URL and HTTP method; this could be used for HTTP headers as well - Updated the existing tests for RequestMgrTest - Added test for RequestMgr::createRequestDetails - Added tests for PatternURLCreationImpl::createServiceUrl( a lot of formatting, modified only the method: testOriginalCreation)
Almost ready for merging. Checking if more tests are needed. |
URLService proposed improvements
I cancelled the merge.
urlAction and serviceAction are declared globally. Let's make them local. |
then push again to you branch and reopen the pull request. |
Change
Two changes to the
URLService
framework, needed for interaction with RESTFul services :service specification
structure, instead of a rawactionName
string, to be used by theURLService
to determine the target requestURLService
can now return a structuredrequest details
instead of a raw URL, which can for now contain URL and HTTP method; this mechanism could later be used forURLService
to define needed HTTP headers as well (Range:
,Accept:
, ...)Example use
New way to call sendJsonRequest from a module :
Usage in an URLService implementation :