How should I build a good (web) API

前端 未结 5 1840
忘了有多久
忘了有多久 2021-01-30 09:50

I\'m going to build an API for a web app and I\'m interested in what people can suggest as good practices.

I\'m already planning to make it versioned (version 1 can only

5条回答
  •  萌比男神i
    2021-01-30 10:04

    Use REST.

    Read up on standards for APIs, or copy the ideas from one of the popular ones.

    Be careful when authenticating users.

    Start very very simple.

    Build a site that uses your API (even if it's not useful) to check things work. Perhaps you could build a mobile version of the site or something that forces you to use the API in a lot of depth.

提交回复
热议问题