Axios and ajax are adding null to the Url. Can you solve this?

$.ajax({
url: “url”,
method: “POST”,
data: formData,
headers: {
‘X-CSRF-TOKEN’: csrf,
},
processData: false,
contentType: false,
success: function (response) {
if (response) {
}
},
error: function (xhr) {
}
});

This is the error I am getting from the backend. The GET method is not supported for route url/null. Supported methods: POST.

As you can confirm it is not using get or adding null to the url.

what is the backend? is it a project you have created yourself, or is it a publicly avaialble API?

Laravel PHP framework. Created by me.