File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,12 @@ class HttpRequestBuilder {
7878 return this ;
7979 }
8080
81+ public setFormUrlEncodedBody ( searchParams : URLSearchParams ) : this {
82+ this . body = searchParams . toString ( ) ;
83+ this . headers . set ( HeaderKeys . CONTENT_TYPE , "application/x-www-form-urlencoded" ) ;
84+ return this ;
85+ }
86+
8187 public setHeader ( key : string , value : string ) : this {
8288 this . headers . set ( key , value ) ;
8389 return this ;
@@ -99,12 +105,6 @@ class HttpRequestBuilder {
99105 return this ;
100106 }
101107
102- public setSearchParamsBody ( searchParams : URLSearchParams ) : this {
103- this . body = searchParams . toString ( ) ;
104- this . headers . set ( HeaderKeys . CONTENT_TYPE , "application/x-www-form-urlencoded" ) ;
105- return this ;
106- }
107-
108108 public setUrlSearchParameter ( key : string , value : string ) : this {
109109 this . url . searchParams . set ( key , value ) ;
110110 return this ;
You can’t perform that action at this time.
0 commit comments