Open naveennvrgup opened 4 years ago
If encountered any ambiguity or have a better alternative in mind let us discuss it over here. :star_struck:
Please add exhaustive docs and extract the base url from utils/ApiClient.js
into utils/Constants.js
@naveennvrgup Can I know how "every member functions should return this(instance of the class) so that chaining of functions is possible" this can be achieved?
Is it something like this?
Oh my doubts are clear, I want to work on this issue.
I am assigning this issue to @pratik0204
try something like
class People{
setName(name){
//do something
return this
}
setAge(age){
// do something
return this
}
}
let naveen = People()
.setName('tony')
.setAge('18')
Is your feature request related to a problem? Please describe. We need to send files and images occasionally in the requests. It helps to have to class which simplifies all the complexity involved in the XHR requests. So let a build a class which will make it as simple as
Describe the solution you'd like Make a class XhrClient which is default export at
utils/XhrClient.js
Additional context Build a class with description as below.
data members:
FormData
XMLHttpRequest
member functions:
every member functions should return
this(instance of the class)
so that chaining of functions is possibleMake a story so that we can test the functionality of this class.