Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

how to post www-form-urlencoded #377

Open
@barron9

Description

@barron9

hi

I can't send any for post to server. this is what I am using this code.

addplaca(){
RNFetchBlob.fetch('POST', 'http://www.sapi.php/psas',
{
// Authorization : "Bearer access-token",
// otherHeader : "foo",
'Content-Type' : 'application/x-www-form-urlencoded',
}, [
// element with property filename will be transformed into file in form data
// { id : '', email :this.state.emailaddress, placa: this.state.emailaddress, data:""},
{ name : 'id',data:'21' },
{ name : 'email',data:'a' },
{ name : 'plasca',data:'a' }

]

).then((resp) => {
// alert(resp.json().categories.records.length)
alert(resp.text())
}).catch((err) => {
// ...
alert(err.text())
})

}

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions