D
D
Demigodd2020-05-08 09:58:28
JavaScript
Demigodd, 2020-05-08 09:58:28

How to solve the long URL problem?

When sending a GET request, if Network> Headers> Request URLhas a length of 10000+ characters, then the request ends with an error.
The error appears if, for example, you write a very long text in the search or include many filters in the parameters.

There are no error statuses, in Console

Access to XMLHttpRequest at https://some url text.............
GET https://some url text............. net::ERR_FAILED


It is clear that the link is very long for a GET request, but what are the ways to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Yarkov, 2020-05-08
@Demigodd

It is clear that the link is very long for a GET request, but what are the ways to solve this problem?

  1. Make it shorter and not transfer so much information to GET.
  2. Use POST.

Sincerely yours K.O.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question