Friday
Hi All,
I have an API call with form data. I am not able to pass the parameters correctly. Please suggest how to update the script? (I have masked url and password)
Following is my custom script
const options1 = {
url: '<url>',
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
formData: {
'username': 'auth_user',
'password': '<password>'
}
};Request clarification before answering.
hi @shruti_chhabra
Since your content type is url encoded in the request , you can't pass parameters as formData object.
'Content-Type': 'application/x-www-form-urlencoded'You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.