Browse Source

unescape unicode when generate postman collections

Ricky Bien 4 years ago
parent
commit
c1e5c4eba0
1 changed files with 2 additions and 2 deletions
  1. 2 2
      src/Writing/PostmanCollectionWriter.php

+ 2 - 2
src/Writing/PostmanCollectionWriter.php

@@ -113,7 +113,7 @@ class PostmanCollectionWriter
         if (($endpoint['metadata']['authenticated'] ?? false) === false) {
             $endpointItem['request']['auth'] = ['type' => 'noauth'];
         }
-        
+		
         foreach ($endpoint['responses'] as $index => $response) {
 			$endpointItem['response'][] = [
 				'name'            => $endpointItem['name'] . ' Response #' . ($index + 1),
@@ -160,7 +160,7 @@ class PostmanCollectionWriter
                 break;
             case 'raw':
             default:
-                $body[$inputMode] = json_encode($endpoint['cleanBodyParameters'], JSON_PRETTY_PRINT);
+                $body[$inputMode] = json_encode($endpoint['cleanBodyParameters'], JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE);
         }
         return $body;
     }