6

I'm developing an app for a not so mobilefriendly website.
I do not coorporate with the webmaster, yet, so I need to sort of reverse engineer my way around everything (basically just one feature.. xD).

It's a website for people who likes to fish, and they *have* to submit their catches. So, when people submit their catches via the form and click "Submit", the URL they are sent to goes like
http://url.tld/submit_catch.asp/...

I can't figure out if that is a POST request, or what it is.
Somehow, I need to submit a catch from the Android App, and all I currently got is that URL.

What do I need to look into to solve my issue here? Any help appreciated :)

Comments
  • 0
    @CoffeeNcode no, i havent. Im still new to web backend stuff :P
    Ill give it a shot, thanks :)
  • 0
    Ask them for a API Documentation. If they have none, throw the job :P
  • 0
    Just realized the entire URL doesnt show :i
    It goes like: submit_catch.asp?dg=7&md=6&aar=2018
  • 0
    @leon3103 its a hobby and the webmaster is busy with other things.
    Additionally, i think the site was built in the year 2000 xD
  • 1
    @JiggleTits that's a get request
  • 0
    @leon3103 @CoffeeNcode
    Looks like a get request, as Leon said.

    I can perform one in Java that works just as well as pressing the "Submit" button on the website, right?
  • 1
    @Alice could also be a combination. Trust me. I've seen it. 😶
  • 1
    @JiggleTits Check out postman for crafting your own requests, you could also use fiddler 4.

    Forms are usually encoded with content type x-www-form-urlencoded:

    POST /api/test/ HTTP/1.1

    Host: example.com

    Content-Type: application/x-www-form-urlencoded

    Cache-Control: no-cache

    test=test&test1=test1
  • 0
    @raldo94 Does some GET requests contain "POST" in their content type? o.o
  • 0
    @Alice I dont know if the page supports POST requests (i assume its something the backend guy has to set up), so i prefer to just go with what i know it accepts, which is GET requests :P
  • 0
    @JiggleTits Sorry posted the whole header for an POST request, generated an example for java using okhttp library
  • 0
    @raldo94 so, thats a GET request, using OkHTTP, which should be the same as hitting the "Submit" button on the web page?
  • 0
    Without a request body and headers:
  • 0
    @raldo94 web stuff is not as simple as i thought xD
  • 1
    @JiggleTits forms for the most part use POST, but depending the method attribute in the <form> tag is set to
  • 1
    @JiggleTits If it was a POST, it would not be marked as GET like in your screenshot.
    Play around with the dev tools and find a POST when you visit another page. That way you can learn the difference
  • 1
    @ruhe i think i would learn better if i made a service myself that used post, i currently don't have any motivation to learn it.
    Thanks for the advice tho :)
  • 0
    @JiggleTits but if you are talking about building services you are digging way deeper into this code add than you probably want to. There is a lot that goes into that. Using routes, processing requests, interfacing with the database through the backend language, adapting to whatever conventions are in that backend language, etc.

    With the app dev you need to just learn how the requests look and recreate that in your app language.
  • 1
    @jeeper all of it interests me, but i think youre right :P
  • 1
    @JiggleTits yeaaa if you already aren’t cooperating with the webmaster, getting into the code to write news services is gonna be...interesting
  • 1
  • 2
    Get good old wireshark. To check your app

    1) make your computer into a wifi hotspot and connect your phone to it
    2) turn on wireshark
    3) submit the form in the browser
    4) submit it from the app

    Do they look the same? If not, change your app.
Add Comment