0

I interpret a G code file (CNC language), serialize it into a class, and try to send in the http protocol to my API, which has a GET method.

However it is too long a string to be sent by Http.

Is there any solution to this problem? Something like compression?

Request URL Too Long HTTP Error 414. The request URL is too long.

Using Asp.Net WebAPI

1 Answers1

0

Try using POST on both sides. Doing so also makes more sense from a REST point of view, as you are submitting data, not doing a query.

Note that GET requests are usually very limited in size, see e.g. here: maximum length of HTTP GET request?

Peter B
  • 22,460
  • 5
  • 32
  • 69