Skip to content

Commit

Permalink
Fix to override config, and modify POST body (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
nnnlog authored Dec 4, 2020
1 parent cbabd6b commit fff660b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/api/web-api-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export abstract class WebApiClient implements ApiHeaderDecorator {
if (form) {
let formData = this.convertToFormData(form);

reqData.data = formData;
reqData.data = formData.toString();
}

let res = JsonUtil.parseLoseless((await Axios.request(reqData)).data);
Expand Down
2 changes: 1 addition & 1 deletion src/config/client-config-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class DefaultClientConfigProvider implements ClientConfigProvider {
private configuration: ClientConfig;

constructor(config?: Partial<ClientConfig>) {
this.configuration = config ? Object.assign(config, DefaultConfiguration) : DefaultConfiguration;
this.configuration = config ? Object.assign(DefaultConfiguration, config) : DefaultConfiguration;
}

get Configuration() {
Expand Down

0 comments on commit fff660b

Please sign in to comment.