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

Error after installation when I call the example #7

Open
Jackpoto opened this issue Jan 2, 2017 · 2 comments
Open

Error after installation when I call the example #7

Jackpoto opened this issue Jan 2, 2017 · 2 comments

Comments

@Jackpoto
Copy link

Jackpoto commented Jan 2, 2017

Hi,

I follow your recommandations but it doesn(t work for me.

Here is my output when I call the example.php after fill in the api-config.php with good informations :
php example.php

  • About to connect() to 10.10.6.1 port 80 (#0)
  • Trying 10.10.6.1…
  • Connected to 10.10.6.1 (10.10.6.1) port 80 (#0)

POST /api/myapp/user/ HTTP/1.1
User-Agent: phpipam-api php class
Host: 10.10.6.1
Accept: /
Authorization: Basic QWRtaW46YWRtaW5jbmFm
Content-Length: -1
Content-Type: application/x-www-form-urlencoded
Expect: 100-continue

  • Empty reply from server
  • Connection #0 to host 10.10.6.1 left intact
    {“code”:400,”success”:false,”message”:”Curl error: Empty reply from server”}

I don’t understand why in my output the Content-Type is not json/application !
Have you an idea ?

I’m in master version of Ipam.
I installed the api-clients in the same server than Ipam.

I can call API with curl :
curl -X GET -H ‘token:H7Da9AAL6.dQMVHFpCKl$9QK’ ‘http://10.10.6.1/api/myapi/sections/’
{“code”:200,”success”:true,”data”:[{“id”:”5″,”name”:”Commun (N2)”,”description”:”Test \u00e0 chaque site”,”masterSection”:”0″,”permissions”:”{\”2\”:\”3\”,\”3\”:\”1\”}”,”strictMode”:”1″,”subnetOrdering”:”default”,”order”:”1″,”editDate”:”2016-09-26 13:53:41″,”showVLAN”:”1″,”showVRF”:”1″,”DNS”:null,”links”:[{“rel”:”self”,”href”:”/api/myapi/sections/5/”}]},{“id”:”3″,”name”:”Test section”,”description”:”Network Master”,”masterSection”:”0″,”permissions”:”{\”2\”:\”3\”,\”3\”:\”1\”}”,”strictMode”:”1″,”subnetOrdering”:”default”,”order”:”2″,”editDate”:”2016-09-13
…..
….

Sorry if I missed something.

@dowdot
Copy link

dowdot commented Apr 14, 2018

Me too, Will you solve it? Do you know if the problem is there?

@gilcot
Copy link

gilcot commented Aug 9, 2018

Oh, it's like the issue #17 ; please check @dowdot & @Jackpoto

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

No branches or pull requests

3 participants