File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 22 "name" : " unstructured-client" ,
33 "version" : " 0.18.1" ,
44 "author" : " Unstructured" ,
5- "main" : " src /index.js" ,
5+ "main" : " . /index.js" ,
66 "sideEffects" : false ,
77 "repository" : {
88 "type" : " git" ,
Original file line number Diff line number Diff line change @@ -245,8 +245,19 @@ export async function generalPartition(
245245
246246 const path = pathToFunc ( "/general/v0/general" ) ( ) ;
247247
248+ let acceptHeader = "application/json" ;
249+ if ( payload . partition_parameters . output_format ) {
250+ switch ( payload . partition_parameters . output_format ) {
251+ case "text/csv" :
252+ acceptHeader = "text/csv" ;
253+ break ;
254+ default :
255+ acceptHeader = "application/json" ;
256+ }
257+ }
258+
248259 const headers = new Headers ( {
249- Accept : payload . partition_parameters . output_format ,
260+ Accept : acceptHeader ,
250261 "unstructured-api-key" : encodeSimple (
251262 "unstructured-api-key" ,
252263 payload [ "unstructured-api-key" ] ,
You can’t perform that action at this time.
0 commit comments