File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ export const nsurlsession: Client<NsurlsessionOptions> = {
5353
5454 switch ( postData . mimeType ) {
5555 case 'application/x-www-form-urlencoded' :
56- if ( postData . params ) {
56+ if ( postData . params ?. length ) {
5757 // By appending parameters one by one in the resulting snippet,
5858 // we make it easier for the user to edit it according to his or her needs after pasting.
5959 // The user can just add/remove lines adding/removing body parameters.
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ export const nsurlsession: Client<NsurlsessionOptions> = {
5858 // we make it easier for the user to edit it according to his or her needs after pasting.
5959 // The user can just add/remove lines adding/removing body parameters.
6060 blank ( ) ;
61- if ( postData . params ) {
61+ if ( postData . params ?. length ) {
6262 const [ head , ...tail ] = postData . params ;
6363 push (
6464 `let postData = NSMutableData(data: "${ head . name } =${ head . value } ".data(using: String.Encoding.utf8)!)` ,
You can’t perform that action at this time.
0 commit comments