@@ -75,17 +75,21 @@ -(NSNumber*) updatePetWithCompletionBlock: (SWGPet*) body
75
75
76
76
77
77
78
- NSArray * requestContentTypes = @[@" application/json" , @" application/xml" , ];
79
- NSString * requestContentType = [requestContentTypes count ] > 0 ? requestContentTypes[0 ] : @" application/json" ;
80
-
81
- NSArray * responseContentTypes = @[@" application/json" , @" application/xml" ];
82
- NSString * responseContentType = [responseContentTypes count ] > 0 ? responseContentTypes[0 ] : @" application/json" ;
83
-
84
78
NSMutableDictionary * queryParams = [[NSMutableDictionary alloc ] init ];
85
79
86
80
NSMutableDictionary * headerParams = [NSMutableDictionary dictionaryWithDictionary: self .defaultHeaders];
87
81
88
82
83
+
84
+ // HTTP header `Accept`
85
+ NSArray *headerAccept = @[@" application/json" , @" application/xml" ];
86
+ headerParams[@" Accept" ] = [SWGApiClient selectHeaderAccept: headerAccept];
87
+ NSString *responseContentType = [headerParams[@" Accept" ] componentsSeparatedByString: @" , " ][0 ];
88
+
89
+ // HTTP header `Content-Type`
90
+ NSArray *headerContentType = @[@" application/json" , @" application/xml" , ];
91
+ headerParams[@" Content-Type" ] = [SWGApiClient selectHeaderContentType: headerContentType];
92
+ NSString *requestContentType = headerParams[@" Content-Type" ];
89
93
90
94
id bodyDictionary = nil ;
91
95
@@ -166,17 +170,21 @@ -(NSNumber*) addPetWithCompletionBlock: (SWGPet*) body
166
170
167
171
168
172
169
- NSArray * requestContentTypes = @[@" application/json" , @" application/xml" , ];
170
- NSString * requestContentType = [requestContentTypes count ] > 0 ? requestContentTypes[0 ] : @" application/json" ;
171
-
172
- NSArray * responseContentTypes = @[@" application/json" , @" application/xml" ];
173
- NSString * responseContentType = [responseContentTypes count ] > 0 ? responseContentTypes[0 ] : @" application/json" ;
174
-
175
173
NSMutableDictionary * queryParams = [[NSMutableDictionary alloc ] init ];
176
174
177
175
NSMutableDictionary * headerParams = [NSMutableDictionary dictionaryWithDictionary: self .defaultHeaders];
178
176
179
177
178
+
179
+ // HTTP header `Accept`
180
+ NSArray *headerAccept = @[@" application/json" , @" application/xml" ];
181
+ headerParams[@" Accept" ] = [SWGApiClient selectHeaderAccept: headerAccept];
182
+ NSString *responseContentType = [headerParams[@" Accept" ] componentsSeparatedByString: @" , " ][0 ];
183
+
184
+ // HTTP header `Content-Type`
185
+ NSArray *headerContentType = @[@" application/json" , @" application/xml" , ];
186
+ headerParams[@" Content-Type" ] = [SWGApiClient selectHeaderContentType: headerContentType];
187
+ NSString *requestContentType = headerParams[@" Content-Type" ];
180
188
181
189
id bodyDictionary = nil ;
182
190
@@ -257,12 +265,6 @@ -(NSNumber*) findPetsByStatusWithCompletionBlock: (NSArray*) status
257
265
258
266
259
267
260
- NSArray * requestContentTypes = @[];
261
- NSString * requestContentType = [requestContentTypes count ] > 0 ? requestContentTypes[0 ] : @" application/json" ;
262
-
263
- NSArray * responseContentTypes = @[@" application/json" , @" application/xml" ];
264
- NSString * responseContentType = [responseContentTypes count ] > 0 ? responseContentTypes[0 ] : @" application/json" ;
265
-
266
268
NSMutableDictionary * queryParams = [[NSMutableDictionary alloc ] init ];
267
269
if (status != nil ) {
268
270
@@ -274,6 +276,16 @@ -(NSNumber*) findPetsByStatusWithCompletionBlock: (NSArray*) status
274
276
NSMutableDictionary * headerParams = [NSMutableDictionary dictionaryWithDictionary: self .defaultHeaders];
275
277
276
278
279
+
280
+ // HTTP header `Accept`
281
+ NSArray *headerAccept = @[@" application/json" , @" application/xml" ];
282
+ headerParams[@" Accept" ] = [SWGApiClient selectHeaderAccept: headerAccept];
283
+ NSString *responseContentType = [headerParams[@" Accept" ] componentsSeparatedByString: @" , " ][0 ];
284
+
285
+ // HTTP header `Content-Type`
286
+ NSArray *headerContentType = @[];
287
+ headerParams[@" Content-Type" ] = [SWGApiClient selectHeaderContentType: headerContentType];
288
+ NSString *requestContentType = headerParams[@" Content-Type" ];
277
289
278
290
id bodyDictionary = nil ;
279
291
@@ -344,12 +356,6 @@ -(NSNumber*) findPetsByTagsWithCompletionBlock: (NSArray*) tags
344
356
345
357
346
358
347
- NSArray * requestContentTypes = @[];
348
- NSString * requestContentType = [requestContentTypes count ] > 0 ? requestContentTypes[0 ] : @" application/json" ;
349
-
350
- NSArray * responseContentTypes = @[@" application/json" , @" application/xml" ];
351
- NSString * responseContentType = [responseContentTypes count ] > 0 ? responseContentTypes[0 ] : @" application/json" ;
352
-
353
359
NSMutableDictionary * queryParams = [[NSMutableDictionary alloc ] init ];
354
360
if (tags != nil ) {
355
361
@@ -361,6 +367,16 @@ -(NSNumber*) findPetsByTagsWithCompletionBlock: (NSArray*) tags
361
367
NSMutableDictionary * headerParams = [NSMutableDictionary dictionaryWithDictionary: self .defaultHeaders];
362
368
363
369
370
+
371
+ // HTTP header `Accept`
372
+ NSArray *headerAccept = @[@" application/json" , @" application/xml" ];
373
+ headerParams[@" Accept" ] = [SWGApiClient selectHeaderAccept: headerAccept];
374
+ NSString *responseContentType = [headerParams[@" Accept" ] componentsSeparatedByString: @" , " ][0 ];
375
+
376
+ // HTTP header `Content-Type`
377
+ NSArray *headerContentType = @[];
378
+ headerParams[@" Content-Type" ] = [SWGApiClient selectHeaderContentType: headerContentType];
379
+ NSString *requestContentType = headerParams[@" Content-Type" ];
364
380
365
381
id bodyDictionary = nil ;
366
382
@@ -432,17 +448,29 @@ -(NSNumber*) getPetByIdWithCompletionBlock: (NSNumber*) petId
432
448
[requestUrl replaceCharactersInRange: [requestUrl rangeOfString: [NSString stringWithFormat: @" %@%@%@ " , @" {" , @" petId" , @" }" ]] withString: [SWGApiClient escape: petId]];
433
449
434
450
435
- NSArray * requestContentTypes = @[];
436
- NSString * requestContentType = [requestContentTypes count ] > 0 ? requestContentTypes[0 ] : @" application/json" ;
437
-
438
- NSArray * responseContentTypes = @[@" application/json" , @" application/xml" ];
439
- NSString * responseContentType = [responseContentTypes count ] > 0 ? responseContentTypes[0 ] : @" application/json" ;
440
-
441
451
NSMutableDictionary * queryParams = [[NSMutableDictionary alloc ] init ];
442
452
443
453
NSMutableDictionary * headerParams = [NSMutableDictionary dictionaryWithDictionary: self .defaultHeaders];
444
454
445
455
456
+
457
+ // HTTP header `Accept`
458
+ NSArray *headerAccept = @[];
459
+ headerParams[@" Accept" ] = [SWGApiClient selectHeaderAccept: headerAccept];
460
+ NSString *responseContentType = [headerParams[@" Accept" ] componentsSeparatedByString: @" , " ][0 ];
461
+
462
+ // HTTP header `Content-Type`
463
+ NSArray *headerContentType = @[];
464
+ headerParams[@" Content-Type" ] = [SWGApiClient selectHeaderContentType: headerContentType];
465
+ NSString *requestContentType = headerParams[@" Content-Type" ];
466
+
467
+ NSLog (@" --------------------------------" );
468
+ NSLog (@" request type: %@ " , requestContentType);
469
+ NSLog (@" response type: %@ " , responseContentType);
470
+ NSLog (@" headers: %@ " , headerParams);
471
+ NSLog (@" --------------------------------" );
472
+
473
+
446
474
447
475
id bodyDictionary = nil ;
448
476
@@ -519,17 +547,21 @@ -(NSNumber*) updatePetWithFormWithCompletionBlock: (NSString*) petId
519
547
[requestUrl replaceCharactersInRange: [requestUrl rangeOfString: [NSString stringWithFormat: @" %@%@%@ " , @" {" , @" petId" , @" }" ]] withString: [SWGApiClient escape: petId]];
520
548
521
549
522
- NSArray * requestContentTypes = @[@" application/x-www-form-urlencoded" , ];
523
- NSString * requestContentType = [requestContentTypes count ] > 0 ? requestContentTypes[0 ] : @" application/json" ;
524
-
525
- NSArray * responseContentTypes = @[@" application/json" , @" application/xml" ];
526
- NSString * responseContentType = [responseContentTypes count ] > 0 ? responseContentTypes[0 ] : @" application/json" ;
527
-
528
550
NSMutableDictionary * queryParams = [[NSMutableDictionary alloc ] init ];
529
551
530
552
NSMutableDictionary * headerParams = [NSMutableDictionary dictionaryWithDictionary: self .defaultHeaders];
531
553
532
554
555
+
556
+ // HTTP header `Accept`
557
+ NSArray *headerAccept = @[@" application/json" , @" application/xml" ];
558
+ headerParams[@" Accept" ] = [SWGApiClient selectHeaderAccept: headerAccept];
559
+ NSString *responseContentType = [headerParams[@" Accept" ] componentsSeparatedByString: @" , " ][0 ];
560
+
561
+ // HTTP header `Content-Type`
562
+ NSArray *headerContentType = @[@" application/x-www-form-urlencoded" , ];
563
+ headerParams[@" Content-Type" ] = [SWGApiClient selectHeaderContentType: headerContentType];
564
+ NSString *requestContentType = headerParams[@" Content-Type" ];
533
565
534
566
id bodyDictionary = nil ;
535
567
@@ -606,19 +638,23 @@ -(NSNumber*) deletePetWithCompletionBlock: (NSString*) apiKey
606
638
[requestUrl replaceCharactersInRange: [requestUrl rangeOfString: [NSString stringWithFormat: @" %@%@%@ " , @" {" , @" petId" , @" }" ]] withString: [SWGApiClient escape: petId]];
607
639
608
640
609
- NSArray * requestContentTypes = @[];
610
- NSString * requestContentType = [requestContentTypes count ] > 0 ? requestContentTypes[0 ] : @" application/json" ;
611
-
612
- NSArray * responseContentTypes = @[@" application/json" , @" application/xml" ];
613
- NSString * responseContentType = [responseContentTypes count ] > 0 ? responseContentTypes[0 ] : @" application/json" ;
614
-
615
641
NSMutableDictionary * queryParams = [[NSMutableDictionary alloc ] init ];
616
642
617
643
NSMutableDictionary * headerParams = [NSMutableDictionary dictionaryWithDictionary: self .defaultHeaders];
618
644
619
645
if (apiKey != nil )
620
646
headerParams[@" api_key" ] = apiKey;
621
647
648
+
649
+ // HTTP header `Accept`
650
+ NSArray *headerAccept = @[@" application/json" , @" application/xml" ];
651
+ headerParams[@" Accept" ] = [SWGApiClient selectHeaderAccept: headerAccept];
652
+ NSString *responseContentType = [headerParams[@" Accept" ] componentsSeparatedByString: @" , " ][0 ];
653
+
654
+ // HTTP header `Content-Type`
655
+ NSArray *headerContentType = @[];
656
+ headerParams[@" Content-Type" ] = [SWGApiClient selectHeaderContentType: headerContentType];
657
+ NSString *requestContentType = headerParams[@" Content-Type" ];
622
658
623
659
id bodyDictionary = nil ;
624
660
@@ -681,17 +717,21 @@ -(NSNumber*) uploadFileWithCompletionBlock: (NSNumber*) petId
681
717
[requestUrl replaceCharactersInRange: [requestUrl rangeOfString: [NSString stringWithFormat: @" %@%@%@ " , @" {" , @" petId" , @" }" ]] withString: [SWGApiClient escape: petId]];
682
718
683
719
684
- NSArray * requestContentTypes = @[@" multipart/form-data" , ];
685
- NSString * requestContentType = [requestContentTypes count ] > 0 ? requestContentTypes[0 ] : @" application/json" ;
686
-
687
- NSArray * responseContentTypes = @[@" application/json" , @" application/xml" ];
688
- NSString * responseContentType = [responseContentTypes count ] > 0 ? responseContentTypes[0 ] : @" application/json" ;
689
-
690
720
NSMutableDictionary * queryParams = [[NSMutableDictionary alloc ] init ];
691
721
692
722
NSMutableDictionary * headerParams = [NSMutableDictionary dictionaryWithDictionary: self .defaultHeaders];
693
723
694
724
725
+
726
+ // HTTP header `Accept`
727
+ NSArray *headerAccept = @[@" application/json" , @" application/xml" ];
728
+ headerParams[@" Accept" ] = [SWGApiClient selectHeaderAccept: headerAccept];
729
+ NSString *responseContentType = [headerParams[@" Accept" ] componentsSeparatedByString: @" , " ][0 ];
730
+
731
+ // HTTP header `Content-Type`
732
+ NSArray *headerContentType = @[@" multipart/form-data" , ];
733
+ headerParams[@" Content-Type" ] = [SWGApiClient selectHeaderContentType: headerContentType];
734
+ NSString *requestContentType = headerParams[@" Content-Type" ];
695
735
696
736
id bodyDictionary = nil ;
697
737
0 commit comments