philip,
@philip@mallegolhansen.com avatar

@Are0h Am I missing something obvious? I'd expect the following command to search the API of :

curl -X POST -H "Content-Type: application/json" -d '{"url": "shitposting"}' https://thebad.space/api/v1/search

Instead I get an actual HTML document.

natalie_romana,

@philip @Are0h Opening the url in a browser shows they are moving to a new url?
https://tweaking.thebad.space/

natalie_romana,

@philip Yep, doing the same request using postman to https://tweaking.thebad.space/api/v1/search returns a json response object.

philip,
@philip@mallegolhansen.com avatar

@natalie_romana @Are0h Aha, that was my error, wrong location.

Ro maybe it's on purpose since you're iterating on this, but if not the "API" section on https://tweaking.thebad.space/about needs an update. Appreciate your work on this.

Are0h,

@philip @natalie_romana Oop, even I missed the URL was incorrect.

NIce catch.

STOP BREAKING SHIT PHIL LOL

Are0h,

@philip Is that a url?

philip,
@philip@mallegolhansen.com avatar

@Are0h It's not, good point. Though substituting one in (curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{"url": "example.com"}' https://thebad.space/api/v1/search) has the same result.

Though you lead me to a thought: Could I suggest in a future iteration sending back a JSON response along the lines of {error: “Parameter ‘url' is not a valid URL”} in a case like that?

Are0h,

@philip Well, it's not meant to be used with curl as of yet, so that's a core part of the issue.

But, yes, better error handling is coming.

philip,
@philip@mallegolhansen.com avatar

@Are0h Fair enough. I was just excited to kick the tires.

Any thoughts on open sourcing the project in the future? Could be cool to be able to pitch in a bit here and there down the line.

Are0h,

@philip It is open source. Has been for a while. https://koodu.ubiqueros.com/are0h/TheBadSpace

It's not quite ready for contributors as the data structures are still in flux, so the DB is all over the place, but that will be finalized soon so that I can get some migrations in there for easy setup.

philip,
@philip@mallegolhansen.com avatar

@Are0h Man you're almost getting me excited to write some php again. That's scary.

Are0h,

@philip Ha, PHP is a great language. It's boring and steady.

I'm a NodeJS person too but I went back to PHP because it's just rock solid.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • ngwrru68w68
  • osvaldo12
  • magazineikmin
  • tacticalgear
  • rosin
  • thenastyranch
  • Youngstown
  • InstantRegret
  • slotface
  • everett
  • kavyap
  • cisconetworking
  • khanakhh
  • megavids
  • mdbf
  • cubers
  • tester
  • modclub
  • Durango
  • GTA5RPClips
  • Leos
  • ethstaker
  • anitta
  • normalnudes
  • provamag3
  • JUstTest
  • lostlight
  • All magazines