-
Notifications
You must be signed in to change notification settings - Fork 82
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
Support response types #33
Comments
@Manweill
|
I think i see what happen with it. |
@Manweill |
@LucaDe static createOrUpdateEquipment(
params: {
/** */
input?: CreateOrUpdateEquipmentInput;
} = {} as any,
options: IRequestOptions = {}
): Promise<number> {
return new Promise((resolve, reject) => {
let url = '/api/services/app/Equipment/CreateOrUpdateEquipment';
const configs: IRequestConfig = getConfigs('post', 'application/json', url, options);
let data = { ...params['input'] };
configs.data = data;
axios(configs, resolve, reject);
});
} |
@Manweill |
@Manweill I just flew over the code for response type generation. It seems that you're only providing response types for a status code of 200. In my case the API returns a 201 as Statuscode, when a new Entity is created. |
I think it may be because I only deal with |
@LucaDe |
I don't see why there should be a problem with DELETE methods. I will open a PR to accept 2XX status codes |
OK, Welcome PR~ |
@LucaDe |
@LucaDe |
Currently response types are not typed (e.g. return type is always Promise< any >). It would be great to have these typed as well :)
I might look into this myself, when I find time!
The text was updated successfully, but these errors were encountered: