Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

404 not found #4

Closed
rayoplateado opened this issue Apr 27, 2016 · 13 comments
Closed

404 not found #4

rayoplateado opened this issue Apr 27, 2016 · 13 comments

Comments

@rayoplateado
Copy link

rayoplateado commented Apr 27, 2016

Hi! I'm just curious about Hello-API, reading the documentation I feel it's a really good starting point to create a brand new API using Laravel. So, I followed the installation instructions and everything seems to be fine. API responds. That's ok. The point is that the response from API is always 404.

curl -X POST -H "Accept: application/json" -F "email=test@something.com" -F "password=secret#pass" -F "name=John Doe" "http://api.mega.pro/register"

The answer is:

{"message":"404 Not Found","status_code":404}%

Am I forgetting something?

@rayoplateado
Copy link
Author

10 minutes. Sometimes I need to write my question to be conscious about how to solve the problem.

It's two variables in .env, APP_URL and API_DOMAIN. I forget to change API_DOMAIN to my own domain name.

Now seems to work perfectly.

@Mahmoudz
Copy link
Member

Mahmoudz commented Apr 27, 2016

Cool I'm glad you are using it and would love to hear your feedback :)

If you have any question drop me a direct message on larachat @mahmoud_zalt

@ahmadbadpey
Copy link

This is my .env file content :

APP_URL=hello.dev
APP_FULL_URL=http://hello.dev
API_DOMAIN=api.hello.dev

But every time that I send required values to /register , 404 Not Found returned.
why?

@Mahmoudz
Copy link
Member

@ahmadbadpey sorry for the delayed response, was very busy in the last 2 weeks..

Is this solved now, or you still need some help?!

@ahmadbadpey
Copy link

@Mahmoudz, I can not solve that yet. please help me.

@Mahmoudz
Copy link
Member

@ahmadbadpey if you are trying to run curl -X POST -H "Accept: application/json" -F "email=test@something.com" -F "password=secret#pass" -F "name=John Doe" "http://api.mega.pro/register" maybe it's outdated now, I'll have to update that part of the documentation..

Your problem looks more like configs problem, I cannot tell what's wrong, I'll be manually testing all the code hopefully in the next 3 weeks. But I can advise you to re-check your host file, as the subdomain needs to be defined there.

@Mahmoudz
Copy link
Member

Mahmoudz commented Oct 9, 2016

@ahmadbadpey this part of the documentation is now updated visit here. The endpoint have became http://api.hello.dev/user/register instead of http://api.hello.dev/register

@ahmadbadpey
Copy link

@Mahmoudz , I tried that but a new problem occurred.

I think that configurations are not Problematic beacause when send request to http://api.hello.dev/ the "Welcome to Hello API." is shown.

Of course I am using Postman as client to send request and now when send email, password, name data to http://api.hello.dev/user/register bellow errror is shown :

{
  "message": "syntax error, unexpected '->' (T_OBJECT_OPERATOR)",
  "code": 4,
  "status_code": 500
}

@Mahmoudz
Copy link
Member

@ahmadbadpey I will check that. Do you have the latest version of Hello Api?!

@ahmadbadpey
Copy link

@Mahmoudz , Yes I'm using v0.3.0.

@Mahmoudz
Copy link
Member

Oh I currently only support the master branch. Until I make the first stable release.. I won't be able to find out why you are having this problem because things have changed a lot since then, but once I reach the stable release, there shouldn't be major changes and will have multiple versions so you we can all track everything.. Thanks for using Hello API. Best,

@rockers007
Copy link

@Mahmoudz :any update on this issue?

@Mahmoudz
Copy link
Member

Mahmoudz commented Mar 2, 2017

@rockers007 the 404 problem is almost always configuration issue form the user side. I will put more effort in making this easier and easier.

I saw ur other issue so I assume you solve it!? if not make sure the values in the .env file are matching your domain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants