File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
packages/linejs/client/clients Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1629,7 +1629,7 @@ export class BaseClient extends TypedEventEmitter<ClientEvents> {
1629
1629
}
1630
1630
const body = await response . arrayBuffer ( ) ;
1631
1631
const parsedBody = new Uint8Array ( body ) ;
1632
-
1632
+
1633
1633
// patch empty response
1634
1634
if ( Object . keys ( parsedBody ) . length === 0 ) {
1635
1635
return { value : null , e : null , _info : null } ;
@@ -2014,6 +2014,9 @@ export class BaseClient extends TypedEventEmitter<ClientEvents> {
2014
2014
}
2015
2015
const toType : "talk" | "g2" =
2016
2016
to [ 0 ] === "m" || to [ 0 ] === "t" ? "g2" : "talk" ;
2017
+ const encodedParams = btoa (
2018
+ String . fromCharCode ( ...new TextEncoder ( ) . encode ( JSON . stringify ( param ) ) ) ,
2019
+ ) ;
2017
2020
return this . customFetch (
2018
2021
this . LINE_OBS . prefix + "r/" + toType + "/m/reqseq" ,
2019
2022
{
@@ -2022,7 +2025,7 @@ export class BaseClient extends TypedEventEmitter<ClientEvents> {
2022
2025
"x-line-application" : this . system ?. type as string ,
2023
2026
"x-Line-access" : this . metadata . authToken ,
2024
2027
"content-type" : "application/x-www-form-urlencoded" ,
2025
- "x-obs-params" : btoa ( JSON . stringify ( param ) ) ,
2028
+ "x-obs-params" : encodedParams ,
2026
2029
} ,
2027
2030
body : data ,
2028
2031
method : "POST" ,
You can’t perform that action at this time.
0 commit comments