Coder Social home page Coder Social logo

rest api feature? about gohttpserver HOT 4 CLOSED

hoogw avatar hoogw commented on September 18, 2024
rest api feature?

from gohttpserver.

Comments (4)

hoogw avatar hoogw commented on September 18, 2024

http://localhost:8000/xxx?f=json

return json

http://localhost:8000/xxx

return regular html(just like it is now)

from gohttpserver.

codeskyblue avatar codeskyblue commented on September 18, 2024

try to use chrome debug tools to see the rest api.

from gohttpserver.

hoogw avatar hoogw commented on September 18, 2024

Perfect, well done.

http://xxxxx.com:8000/-/json/?_=1545072048246

will give you a nice json response. as
nice and well done.

`

{
"auth": {
"upload": false,
"delete": false,
"users": null,
"AccessTables": null
},
"files": [
{
"name": "City of Costa Mesa",
"path": "City of Costa Mesa",
"type": "dir",
"size": 58084919,
"mtime": 1544829343544
},
{
"name": "Los Angeles County Public Work/landrecords",
"path": "Los Angeles County Public Work/landrecords",
"type": "dir",
"size": 678440673,
"mtime": 1544827660045
},
{
"name": "Los Angeles County Regional Planning",
"path": "Los Angeles County Regional Planning",
"type": "dir",
"size": 638026825,
"mtime": 1544816016211
},
{
"name": "Los Angeles Public Work/Bureau of Engineering",
"path": "Los Angeles Public Work/Bureau of Engineering",
"type": "dir",
"size": 21696026490,
"mtime": 1544824661671
},
{
"name": "config.yml",
"path": "config.yml",
"type": "file",
"size": 90,
"mtime": 1544816316334
}
]
}

`

from gohttpserver.

hoogw avatar hoogw commented on September 18, 2024

The response json have path, it is full path relative to home, very nice, well done.

`
{
"auth": {
"upload": false,
"delete": false,
"users": null,
"AccessTables": null
},
"files": [
{
"name": "Annexation",
"path": "City of Costa Mesa/Annexation",
"type": "dir",
"size": 2810296,
"mtime": 1544829343447
},
{
"name": "general",
"path": "City of Costa Mesa/general",
"type": "dir",
"size": 55274623,
"mtime": 1544829344940
}
]
}

`

from gohttpserver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.