-
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
http auth support #4
Conversation
Http auth support
Bump version, append dev script
* @param {Object} locatorObject | ||
* @param {String} path | ||
* @returns {String} | ||
*/ | ||
export function contentUrl(options, locatorObject, path) { | ||
const baseUrl = apiUrl(options); | ||
export function contentUrl(locatorObject, path) { | ||
const locator = locatorToString(locatorObject); |
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.
maybe add .toString()
method to locator object?
Then you will no need to import locatorToString and call it many times, just ..${locator}..
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.
locatorObject
is pure js
object, that specified by client.
For example:
var locator = {
buildType: {
id: 123
}
};
client.build.detail(locator)
.then(processResponse);
I think, it's harmfull to force user import additional class from teamcity-client
package.
var client = require('teamcity-client');
var Locator = require('teamcity-client/locator');
var locator = new Locator({
buildType: {
id: 123
}
});
client.build.detail(locator)
.then(processResponse);
👍 |
Add http-client description
@vitalets
#3