2

I'm trying creating an API that takes a huge text as input using Flask in python.

enter image description here

When I input a small text it works and I get response [200], However for large text I get response [404] as if the route doesn't exist. How can I get over this?

3
  • 1
    How long is "long"? Even browsers exhibit some maximum URL length, and any component in between might as well, so it's not advisable to try to use URLs longer than ~1024 characters or so in practice. Commented May 20, 2021 at 13:07
  • send data in the request body? Commented May 20, 2021 at 13:11
  • Yes it's definitely more than 1024 characters. "long" as in 300 words approx. Commented May 21, 2021 at 9:34

1 Answer 1

1

The url has a maximum length limit. I suggest you use the post method and pass the text content as the request body.
If you need Code, just comment and let me know.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes Please I'd appreciate your help. I tried the post method but apparently I didn't apply it correctly. Thank you in advance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.