mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 19:33:55 +00:00
Set accept header for JavaScript client
This commit is contained in:
parent
93cadcd755
commit
ecbc4a147c
@ -130,6 +130,11 @@
|
||||
request.send(bodyParam);
|
||||
}
|
||||
|
||||
var accept = this.jsonPreferredMime(accepts);
|
||||
if (accept) {
|
||||
request.accept(accept);
|
||||
}
|
||||
|
||||
request.end(function(error, response) {
|
||||
if (callback) {
|
||||
var data = response && response.body;
|
||||
|
@ -130,6 +130,11 @@
|
||||
request.send(bodyParam);
|
||||
}
|
||||
|
||||
var accept = this.jsonPreferredMime(accepts);
|
||||
if (accept) {
|
||||
request.accept(accept);
|
||||
}
|
||||
|
||||
request.end(function(error, response) {
|
||||
if (callback) {
|
||||
var data = response && response.body;
|
||||
|
Loading…
Reference in New Issue
Block a user