简体   繁体   中英

Invalid URI: The Uri string is too long HttpGET

Good afternoon. I ran into a problem. I need to send a List in a GET request from one microservice to another, these strings are from 5 to 10 characters, but I have 2000 items in this list. Returns an error that the URL is too long. When trying to find the answer to the problem, I found out that the maximum length is 2083 characters. Since this is a GET request and there is no way to use the body. How can I send such a large amount of data to another microservice in a GET request?

Thank you Wouter de Kort ♦ for the suggestion.

Does it really need to be a GET request? Could you use a POST instead and put the content in the body? – Wouter de Kort ♦

I looked at the problem again and decided GET request wasn't really necessary. However, I decided to use PATCH instead of POST because I didn't want to confuse it with other proper POST requests and I didn't use PATCH anywhere else.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM