reproduce-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[task #16246] Database authentication with Wget


From: Pedram Ashofteh Ardakani
Subject: [task #16246] Database authentication with Wget
Date: Sat, 27 Aug 2022 02:39:08 -0400 (EDT)

Follow-up Comment #5, task #16246 (project reproduce):

Good point Mohammad: the infrastructure is there now :)

AFAIK APIs do not always use the same variable names with *POST* requests. For
instance, you might see a variety of keywords for authenticating the USER such
as: 'user', 'username', 'name', 'email', etc.

So as you pointed out, the user should edit the values to fit their needs!

I tested with a sample REST API application
<https://www.appsloveworld.com/sample-rest-api-url-for-testing-with-authentication#huserregistration>,
and using 'wget' had many quirks!


wget --method=POST --body-data='{email:"dev@dev.dev",password:123456}'
http://restapi.adequateshop.com/api/authaccount/login --debug --header
"Content-Type: application/json"


If I didn't provide the "Content-Type: application/json" in the header, it
would assume "Content-Type: application/x-www-form-urlencoded". The server did
not accept this and things went south.

So as we can see here, it looks like the request is highly dependent on the
way the API was designed. It's not worth the effort :-) Maneagers can contact
us if they need further support and do not know how to send requests to their
specific API.


    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/task/?16246>

_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]