LokeshvarKr / urlshortener

URL Shortener
1 stars 0 forks source link

[BUG] Getting an error in POST request #1

Closed anju-infracloud closed 2 years ago

anju-infracloud commented 2 years ago

Hi Lokeshvar,

I am facing an error while hitting the POST request that generates shortURL. Attaching the error trace below.

╭─infracloud@anju-infracloud ~/Downloads/urlshortener-master
╰─$ curl -X POST -H "Content-Type: application/json" -d "{\"actualURL\": \"http://veryLoNguRl/v1/api/LLongGUrrrLl/8988\"}" http://localhost:8081/shorturl
json: unknown field "actualURL"

Please take a look

LokeshvarKr commented 2 years ago

Hi ,

Sorry there was some change in API schema, and I missed document updation.

Can u please try this one.

curl -X POST -H "Content-Type: application/json" -d "{\"url\": \"http://veryLoNguRl/v1/api/LLongGUrrrLl/8988\ http://verylongurl/v1/api/LLongGUrrrLl/8988%5C"}" http://localhost:8081/shorturl

Please do let me know if u still face any problem.

Thanks and Regards.

On Wed, 20 Apr 2022, 11:11 am anju-infracloud, @.***> wrote:

Assigned #1 https://github.com/LokeshvarKr/urlshortener/issues/1 to @LokeshvarKr https://github.com/LokeshvarKr.

— Reply to this email directly, view it on GitHub https://github.com/LokeshvarKr/urlshortener/issues/1#event-6460202556, or unsubscribe https://github.com/notifications/unsubscribe-auth/AITNKU53CZSKHACWRZNBJUDVF6KH7ANCNFSM5T23YNTQ . You are receiving this because you were assigned.Message ID: @.***>

LokeshvarKr commented 2 years ago

I have updated the documentation as well.

On Wed, Apr 20, 2022 at 2:34 PM Lokeshvar Kumar @.***> wrote:

Hi ,

Sorry there was some change in API schema, and I missed document updation.

Can u please try this one.

curl -X POST -H "Content-Type: application/json" -d "{\"url\": \"http://veryLoNguRl/v1/api/LLongGUrrrLl/8988\ http://verylongurl/v1/api/LLongGUrrrLl/8988%5C"}" http://localhost:8081/shorturl

Please do let me know if u still face any problem.

Thanks and Regards.

On Wed, 20 Apr 2022, 11:11 am anju-infracloud, @.***> wrote:

Assigned #1 https://github.com/LokeshvarKr/urlshortener/issues/1 to @LokeshvarKr https://github.com/LokeshvarKr.

— Reply to this email directly, view it on GitHub https://github.com/LokeshvarKr/urlshortener/issues/1#event-6460202556, or unsubscribe https://github.com/notifications/unsubscribe-auth/AITNKU53CZSKHACWRZNBJUDVF6KH7ANCNFSM5T23YNTQ . You are receiving this because you were assigned.Message ID: @.***>

anju-infracloud commented 2 years ago

Taking a look

anju-infracloud commented 2 years ago

Works now. Closing the bug