5
Awlex
6y

The world must truly hate me.

I refactored my code a lot in order to easily integrate different APIs endpoints but then I can't use the one I specifically did this for, because of TLS errors.
My browsers all agree that it's fine, but curl and the 2 http libraries I tested can't fetxh any data.

END ME!

Comments
  • 1
    I just made a request with apirequest.io -> works
    Copy the curl command generated.
    -> Doesn't work

    This is fucking bullshit.
  • 1
    curl -k ?
  • 0
    @bahua what I forgot to mention is that when I used curl or the 2nd library I just got a 500.
    Adding -k unfortunately didn't help
  • 3
    Without seeing code it's hard to help.

    But... As some server admins and / or devs are fucktards: Maybe changing the User Agent and / or enabling cookies helps...
  • 0
    @IntrusionCM there's not much code to see

    Tried with elixir and python
    <HTTPLibrary>.get(<url>)

    or

    curl -v -i <url>

    If you wanna try for yourself:
    https://capi-v2.sankakucomplex.com/...

    Yes, it's nsfw api
  • 2
    @Awlex: Exactly what I thought.

    curl --verbose --user-agent 'Mozilla/5.0 (X11; Linux x86_64; rv:65.0) Gecko/20100101 Firefox/65.0' https://capi-v2.sankakucomplex.com/...

    Works.

    If I just use curl --verbose URL it generates a 500.

    Set a user agent.
  • 0
    @IntrusionCM Thanks dude. I honestly didn't think an API would require me to send a user-agent. Probably because they never mentioned it. 🤷‍♂️
  • 1
    @Awlex Yes... Reason I used the term fucktards. It's a booby trap mostly used to prevent ddos attacks from bots - pretty useless, yes.

    Another thing I noticed... You should be careful of the UTF 8 characters inside. I don't know what you try to implement, but in some cases like MySQL, there are still caveats (utf8mb4 vs utf8 for example).

    Happy to help. :) I know the frustration.... XD
  • 0
    Had me totally bamboozled XD

    No worries about the moonrules, I don't store than and even then, my database should be set up for utf8 ;)
Add Comment