index.js
function sendRequest (args) {
  // { options, formData }
  const options = args.options
  const formData = args.formData
  return request(options.endpoint, formData).then(() => options)
}
function sendRequest (args) {
  // { options, formData }
  const options = args.options
  const formData = args.formData
  return request(options.endpoint, formData).then(() => options)
}
function sendRequest ( args ) { // { options, formData } const options = args . options const formData = args . formData return request ( options . endpoint , formData ) . then ( ( ) => options ) }
Posts the form data to the endpoint.

If the endpoint returns a status code other than 200, the promise is rejected.

@param {{options: object, formData: object}}
@returns {Promise<string>}
Posts the form data to the endpoint .