reqwest icon indicating copy to clipboard operation
reqwest copied to clipboard

FormData won't get sent at all.

Open darkyen opened this issue 11 years ago • 0 comments

In the following line if the data type is FormData the condition will go true and hence the form will not be sent. But instead a good old empty string gets sent ^_^.

      // convert non-string objects to query-string form unless o['processData'] is false
      , data = (o['processData'] !== false && o['data'] && typeof o['data'] !== 'string')
        ? reqwest.toQueryString(o['data'])
        : (o['data'] || null)

Can we not just check for existence of FormData and send off they paylaod directly if its a formData ? (It adds support for sending images etc)

darkyen avatar Dec 19 '14 12:12 darkyen