shamsmosowi / git-bot

0 stars 0 forks source link

url of GET request is exceeding the max character limit #36

Open bofeiw opened 1 year ago

bofeiw commented 1 year ago

we are generating url for get request on basis of data i receive from different calls. Some request`s Url is exceeding the maximum character limit of get request. is there a way to reduce the size of url and also to send all data received.

I did find anything regarding this

shamsmosowi commented 1 year ago

Hi,

Yes, you can reduce the size of the URL for a GET request by using URL encoding. URL encoding is a way of representing a data string so that it can be used in a URL without exceeding the maximum character limit. It works by replacing certain characters with a percent sign followed by two hexadecimal digits. This method can be used to encode all the data received from different calls in order to reduce the size of the URL.

You can use the JavaScript encodeURIComponent() method to encode the data string.

I hope this helps!