Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
devTea219136yCorrect me if I’m wrong
POST puts the value sent on the body while GET puts it in the url. Other than that I don’t see any difference. So if you wanna make it less obvious thr valur you’re sending (passwords etc) use POST.
Also it depends on their server how they are handling the request, there is a documentation on their website no? -
@devTea the website was made in 2005 or so, i doubt they designed it to allow third parties to do stuff.
What ive figured out so far, has been by inspecting elements and getting tips from devRanters.
I tried writing (aka copying from various sources) code to submit a post request, and it gave me a 200 OK response every time, but the database table content didnt seem to update. Theres a page on the website that displays the content, i dont have direct access to the database -
devTea219136y@JiggleTits google postman, it’s http request testing software. If it got a result, you just need to code it to suits your need
-
Just looked at it using my Browsers Dev-Tools.
The Backend is ASP.NET (could help for research).
Things you need to do:
- Request you form like a user would and get the cookie (just the Header-Value of "Cookie").
- Maybe use a proper User-Agent (just copy one) to convince the server that you're not a generic bot.
- POST sends the data in the "x-www-form-urlencoded"-Format which is quite common among webbrowsers. It is basically the extra arguments of a GET-Request after the "?" sent in the body.
- Remember to escape the values in the post-body (in Java you can do this with URLEncode).
I hope this helps. I've built a WebServer myself in Java and it helped me a lot in understanding HTTP. -
@LinusCDE Thanks for the answer, ill look into all those things and let you know how it turns out :)
-
@JiggleTits If you could give me data I would be allowed to send to it, I could try making a Java-Utility for submitting to the form.
-
@LinusCDE Do you have Discord or some other place i can message you about it? Anything that works for you is fine for me, id just prefer not to send it here.
-
@JiggleTits Discord is fine (LinusCDE#5111). But I'll be able to talk to you / start looking into it in aprox 16 hours since I'm going to sleep now and have to work tomorrow till about 16 o clock (CEST timezone).
Edit: Should be fine, I guess since you're in the same timezone. -
@LinusCDE Added you, im Bendix. My sleeping schedule is messed up, but ill try to adjust it so i can catch you when it fits you the best :)
Thank you for helping, i really appreciate it -
Http verbs
Get - get a resource and don't change it.
Post - send data to an endpoint, typically to create or change it, but it's up to the endpoint owner to define what happens. In some systems post is used only for resource creation
Not related to your question
Put - replace a resource entirely, typically requires a resource id in the URL. In some frameworks this is used for update, other systems use post for everything
Patch - update one part of a resource, typically requires a resource id in the URL
Delete - delete a resource, typically requires a resource id in the URL
Head - not used much, unless you see people using it to check if a server is up
Examples
Post /users with form data to create a user, get back a user ID
Put /users/123 to replace a user
OR
Post /users/123 to replace a user
Patch /users/123/firstname - change a field in user object
Delete /users/123 - delete user 123
Related Rants
I'm almost at the point where I give up on this project, I'm banging my head too hard against the wall here.
I'm making an android app that should make it easier for local fishermen (hobby stuff, not enterprise things) to submit their catches to the local unions. For that to happen, I need to be able to fill a form in the app, more specifically, this form: http://karupaa.com/dk/...
After some research, I managed to figure out its probably a POST request, but I may be very wrong here.
Also figured out the URL to post to is probably either the first url given, or this one: http://karupaa.com/dk/...
I'm extremely confused at on this area, and any help would be greatly appreciated.
I dont really know anything about POST or GET requests, except for the quick comparison I read on W3Schools. Its an area Im lost in.
help :i
question
post
idk
get
im desperate
help
i need a shrink
android