FileSystem Download Async method POST with body

Please provide the following:

  1. SDK Version:41
  2. Platforms(Android/iOS/web/all): Android/Ios
  3. Add the appropriate “Tag” based on what Expo library you have a question on. #filesystem

i need a way to make a request with method Post passing a body but i didnt find a way to do it.

FileSystem.downloadAsync(${baseUrl}/v1/paycheck/pdf, FileSystem.documentDirectory + ‘file.pdf’,
{
headers: {
‘Authorization’: localToken
},
httpMethod: ‘POST’,

            body: {
                type: 'monthy',
                year: '2021',
                month: 2,
                employer: {
                    name: "Pink",
                }
            }
        }
    )
        .then(({uri}) => {
            Sharing.shareAsync(uri, {dialogTitle: 'Salvar ou Compartilhar'})

        })
        .catch(error => {
            console.error(error);
        });
}

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.