Server API is based on HTTPS and JSON. Clients send messages to the server following the API, and handle
responses from the server.
For overview and further details on the requirements of the system, see the course project work
requirements elsewhere. This document only documents the API that must be supported by server and
client implementations.
Please note that automatic tests will be conducted to verify the functionality. Therefore, both the server
and the client MUST follow this API. Failing to do so fails the tests. If specific input/output is given in the
requirements, it must be the same in your coursework.
Assignment specifications
Minimum requirements
This section provides the minimum requirements for the coursework, ALL requirements must be completed
REQ1 All text in HTTP body MUST be UTF-8.
REQ2 All content in the HTTP requests and responses MUST be JSON except for the error messages from
server which may be text.
REQ3 All dates and times in JSON content MUST follow the ISO 8601 date format in UTC time zone with
milliseconds, e.g. 2020-12-21T07:57:47.131Z.
REQ4 All times must follow the following pattern: “2020-12-21T07:57:47.123Z”
REQ5 HTTP Headers MUST contain the content size in bytes and content type using standard HTTP
headers.
REQ6 HTTP header Content-Type MUST be “application/json”.
REQ7 Database MUST be used to store all user sent data
1.1. Feature 1: User can send inform others about a sightseeing location
URL: https://server.url/info
Request type: POST
Response code for successfully operation: 200
Response code failed operation: 400-499
Header information that must be included in minimum:
- Content-Length: size of the content
- Content-Type: application/json
Authorization: only registered users can perform this operation
Data format for posting a sightseeing location:
{
“locationName” : “Oulun Tuomiokirkko”,
“locationDescription”: “The church of oulu”,
“locationCity”: “Oulu”,
“locationCountry” : “Finland”,
“locationStreetAddress”: “Kirkkokatu 3 A”,
“originalPoster” : ”Pekka”,
“originalPostingTime” : “2020-12-21T07:57:47.123Z”
}
Where:
- locationName is the name of the location and can be chosen by the user
- locationDecription where user can provide a short freely written description about the location
- locationCity is the name of the city where the sightseeing location is
- locationStreetAddress is the local address for the sightseeing location
- originalPoster is the name of the person who sent the location information (user’s chosen
nickname taken from the user’s profile, not to be mixed with login username)
- originalPostingTime time when the user sent the location information, represented in UTC
NOTE: The server doesn’t care whether same location has been sent multiple times so you must make sure
every location information is unique even it has the same information
1.2. Feature 2: Get sightseeing locations posted by users
URL: https://server.url/info
Request type: GET
Response code for successfully operation: 200
Response code failed operation: 400-499
Header information that must be included in minimum:
- Content-Length: size of the content
- Content-Type: application/json
Authorization: only registered users can perform this operation
Data format for sending locations back to client:
[
{
“locationName” : “Oulun Tuomiokirkko”,
“locationDescription”: “The church of oulu”,
“locationCity”: “Oulu”,
“locationCountry” : “Finland”,
“locationStreetAddress”: “Kirkkokatu 3 A”,
“originalPoster” : ”Pekka”,
“originalPostingTime” : “2020-12-21T07:57:47.123Z”
},
{
“locationName” : “Nallikari Beach”,
“locationDescription”: “Local beach at Nallikari”,
“locationCity”: “Oulu”,
“locationCountry” : “Finland”,
“locationStreetAddress”: “Leiritie 10”,
“originalPoster” : ”Anna”,
“originalPostingTime” : “2023-12-21T07:57:47.123Z”
}
]
NOTE: Server MAY also response with 204 and empty response body if there are no coordinates to deliver
to the client.
1.3. Feature 3: Register and authenticate
URL: https://server.url/registration
Request type: POST
Response code for successfully operation: 200
Response code failed operation: 400-499
Header information that must be included in minimum:
- Content-Length: size of the content
- Content-Type: application/json
Authorization: N/A (user can register an account without previous credentials)
Data format for registering user:
{
“userName” : “username”,
“password” : “password”,
“email” : “user.email@for-contacting.com”,
“userNickname” : “Pekka”
}
Description:
Server MUST NOT accept other than registration requests from unauthorized clients. Client MUST send
passwords using HTTPS. Passwords MUST not be sent over insecure HTTP connections. Server MUST not
store the plain password, but only store a hash of it. A good hash function MUST be used to make sure
hashed passwords are secured and as unique as possible to avoid collisions.
For other than registration requests, users MUST be authenticated using Basic HTTP authentication (see
References). Authentication MUST be done over HTTPS using the Authorization header, where
username:password string MUST be UTF-8.
1.4. Feature 4: User can attach coordinate information to the sightseeing
data
URL: https://server.url/info
Request type: POST
Response code for successfully operation: 200
Response code failed operation: 400-499
Header information that must be included in minimum:
- Content-Length: size of the content
- Content-Type: application/json
Authorization: only registered users can perform this operation
Data format for posting a sightseeing location:
{
“locationName” : “Oulun Tuomiokirkko”,
“locationDescription”: “The church of oulu”,
“locationCity”: “Oulu”,
“locationCountry” : “Finland”,
“locationStreetAddress”: “Kirkkokatu 3 A”,
“originalPoster” : ”Pekka”,
“originalPostingTime” : “2020-12-21T07:57:47.123Z”
, “latitude”: “65.0580507136066”,
“longitude”: “25.469414591526057”
}
Where:
- latitude and longitude represent a geolocation based on java html geolocation api (such as used in
google maps for example).
NOTE: Coordiates are not mandatory, if no coordinates exist for a sightseeing location, no coordinate
information is provided in a message when requested from the server.
Advanced API
Any of the following features successfully implemented (passes unit tests and matches requirements)
increases the assignment grade by 1. For example, if two additional features are implemented successfully,
the grade of the assignment 3. If all exercises are also successfully completed, the final course grade is 4.
Feature 5: Attach weather when sightseeing information is requested
URL: https://server.url/info
Request type: POST
Response code for successfully operation: 200
Response code failed operation: 400-499
Header information that must be included in minimum:
- Content-Length: size of the content
- Content-Type: application/json
Authorization: only registered users can perform this operation
Data format for posting a sightseeing location:
{
“locationName” : “Oulun Tuomiokirkko”,
“locationDescription”: “The church of oulu”,
“locationCity”: “Oulu”,
“locationCountry” : “Finland”,
“locationStreetAddress”: “Kirkkokatu 3 A”,
“originalPoster” : ”Pekka”,
“originalPostingTime” : “2020-12-21T07:57:47.123Z”
, “latitude”: “65.0580507136066”,
“longitude”: “25.469414591526057”,
“weather”:””
}
Where:
- weather is a integer, double or “1C” representation of weather given from the weather service
Other information:
- User can opt to attach weather information
- Weather information is based coordinate location
- Weather information is obtained from custom build service that provides basic weather
information based on coordinates
- The messages with weather information must contain temperature information from the location
specified in the request
- The weather service will be provided separately, the server must send the coordinates to the
weather service that will provide the weather information to be added to the coordinates
Feature 6: User can create sightseeing paths with custom tour message
URL: https://server.url/paths
Request type: POST
Response code for successfully operation: 200
Response code failed operation: 400-499
Header information that must be included in minimum:
- Content-Length: size of the content
- Content-Type: application/json
Authorization: only registered users can perform this operation
Data format for posting a tour:
{
“tour_name” : “Quick city center run”,
“tourDescription”: “15 minute tour in Oulu”,
“locations” :
[
{
“locationID”:”1”
}
]
}
Where:
- tour_name is a string name for the tour
- tourDescription is a string description of the tour
- locations is a JSONArray of locations in the tour
- locationID is an unique integer representing a specific location
URL: https://server.url/paths
Request type: GET
Response code for successfully operation: 200
Response code failed operation: 400-499
Header information that must be included in minimum:
- Content-Length: size of the content
- Content-Type: application/json
Authorization: only registered users can perform this operation
Data format for returning a tour:
[
{
“tour_name” : “Quick city center run”,
“tourDescription”: “15 minute tour in Oulu”,
“locations” :
[
{
“locationID”:”1”
“locationName” : “Oulun Tuomiokirkko”,
“locationDescription”: “The church of oulu”,
“locationCity”: “Oulu”,
“locationCountry” : “Finland”,
“locationStreetAddress”: “Kirkkokatu 3 A”,
“originalPoster” : ”Pekka”,
“originalPostingTime” : “2020-12-21T07:57:47.123Z”
}
]
}
]
Other information
- User can select certain locations (each location has an unique id) as a sightseeing path
- Path is not ordered but rather a “collection” of locations
- locations contain a jsonarray that has a list of locations based on their id (create id for your
message), there is no limit for locations other than how many locations a test adds
Feature 7: Sightseeing information can be updated
URL: https://server.url/info
Request type: POST
Response code for successfully operation: 200
Response code failed operation: 400-499
Header information that must be included in minimum:
- Content-Length: size of the content
- Content-Type: application/json
Authorization: only registered users can perform this operation
Data format for posting an update to an existing message:
{
“locationID”:”1”
“locationName” : “Oulun Tuomiokirkko”,
“locationDescription”: “The church of oulu”,
“locationCity”: “Oulu”,
“locationCountry” : “Finland”,
“locationStreetAddress”: “Kirkkokatu 3 A”,
“originalPoster” : ”Pekka”,
“originalPostingTime” : “2020-12-21T07:57:47.123Z”
}
Where:
- locationID is an unique integer representing a specific location (it needs to be given by the server
when the original location is posted)
Example server response for GET
[
{
“locationID”:”1”
“locationName” : “Oulun Tuomiokirkko”,
“locationDescription”: “The church of oulu”,
“locationCity”: “Oulu”,
“locationCountry” : “Finland”,
“locationStreetAddress”: “Kirkkokatu 3 A”,
“originalPoster” : ”Pekka”,
“originalPostingTime” : “2020-12-21T07:57:47.123Z”
“updatereason”: “just updating stuff”,
“modified”: 2024-1-21T07:57:47.123Z”
}
]
Where:
- originalPostingTime is the original timestamp of the location when it was posted first time
- updatereason is a string where user can state a reason for the update
- modified is a timestamp when the edit was made
Other information:
- User can send updates to the sightseeing locations user has sent
o The modified message must show a timestamp of the latest edit
- In order to identify any location, supply an ID (integer) with the message to provide the update to a
right message
- Whether user is allowed to update the message, the server needs to check if the user (not
nickname) has posted the danger message previously. Remember, the nickname is just nickname
user chooses for particular message, the real identificatory is the registered user
- User can give a reason for the update or leave the field empty (it still must be included in the
message when being updated and when retrieving updated messages from the server)
Feature 8: Server tracks how many times sightseeing location is “visited”
URL: https://server.url/info
Request type: POST
Response code for successfully operation: 200
Response code failed operation: 400-499
Header information that must be included in minimum:
- Content-Length: size of the content
- Content-Type: application/json
Authorization: only registered users can perform this operation
Data format for posting a visit to a site:
{
“locationID”:”1”
“locationVisitor” : “Pekka”
}
where
- locationID is unique integer for the location given by the server
- locationVisitor is a string representing a user
Example response to get request in info context:
[
{
“locationID”:”1”
“locationName” : “Oulun Tuomiokirkko”,
“locationDescription”: “The church of oulu”,
“locationCity”: “Oulu”,
“locationCountry” : “Finland”,
“locationStreetAddress”: “Kirkkokatu 3 A”,
“originalPoster” : ”Pekka”,
“originalPostingTime” : “2020-12-21T07:57:47.123Z”
“timesVisited”:”1”
}
]
where
- timesVisited is an integer representing how many times the place has been visited
URL: https://server.url/topfive
Request type: GET
Response code for successfully operation: 200
Response code failed operation: 400-499
Header information that must be included in minimum:
- Content-Length: size of the content
- Content-Type: application/json
Authorization: only registered users can perform this operation
Example response to get request in topfive context:
[
{
“locationID”:”12”
“locationName” : “Snägäri”,
“timesVisited”:”899”
},
{
“locationID”:”7”
“locationName” : “Lentokenttä”,
“timesVisited”:”100”
},
{
“locationID”:”2”
“locationName” : “Nallikari”,
“timesVisited”:”40”
},
{
“locationID”:”10”
“locationName” : “Kaupungintalo”,
“timesVisited”:”5”
},
{
“locationID”:”1”
“locationName” : “Oulun Tuomiokirkko”,
“timesVisited”:”1”
}
]
Other information:
- Server adds a counter to each sightseeing location to indicate how many times it has been
requested from the server
o Note that this only simulates the “visit counter”
- User can request “top 5 destinations” from the server and the server needs to send the 5 most
viewed locations to user
Extra Feature 9: AI location identification
URL: https://server.url/info
Request type: POST
Response code for successfully operation: 200
Response code failed operation: 400-499
Header information that must be included in minimum:
- Content-Length: size of the content
- Content-Type: application/json
Authorization: only registered users can perform this operation
Data format for posting a visit to a site:
{
“locationName” : “Oulun Tuomiokirkko”,
“locationDescription”: “ai_auto_fill”,
“locationCity”: “Oulu”,
“locationCountry” : “Finland”,
“locationStreetAddress”: “Kirkkokatu 3 A”,
“originalPoster” : ”Pekka”,
“originalPostingTime” : “2020-12-21T07:57:47.123Z”
, “latitude”: “65.0580507136066”,
“longitude”: “25.469414591526057”
}
Other information:
- the field with ai_auto_fill needs to be updated with AI response based on other information given
in the message
- the response must be at least 50 characters
- the test only checks if the description is provided in the returning message and if it is at least 50
characters long
- the description is manually checked in order to see whether the text is corresponding to the
location data and not just some random characters
- The AI component is chat4all open source AI that you can download and use in your own computer.
For instructions, see lecture video about AI and example codes are available in the extra section in
moodle.
Additional Quality Improvements
If the software quality is high enough, the final grade of the assignment can be increased by 1. Note that
these are evaluated by the teacher and there are no guidelines what is required in minimum. Here are
examples of the quality aspects we look for:
• Properly commented code/interfaces
• Usage of unit tests
• Old messages are archieved after certain amount of time (for example after 2 months the messages
are removed from the actual database to for example a text file or other database to prevent the
database becoming too large affecting the speed of it)
• System backup
• System recovery
• Clean code
相关推荐
C++构建高性能HTTPS RESTful JSON服务器:从原理到工程实践
在构建现代网络服务时,高性能与安全性是核心诉求。异步I/O模型通过非阻塞操作和事件驱动机制,允许单线程或少量线程高效处理海量并发连接,这是实现高吞吐、低延迟服务的基础原理。其技术价值在于最大化利用系统资源,尤其适合嵌入式、边缘计算及高并发后端等对资源敏感的场景。结合TLS/SSL协议保障数据传输安全,以及JSON作为轻量级数据交换标准,可以构建出既安全又高效的数据通道。本文以C++为核心,详细阐述了如何利用Boost.Asio、OpenSSL和nlohmann/json等库,从零搭建一个生产就绪的HTTPS
10分钟搞定JSON-Server数据加密:从明文传输到HTTPS安全防护
你还在担心本地模拟API的数据安全吗?使用JSON-Server时,默认的HTTP传输可能导致敏感数据在传输过程中被窃取。本文将带你通过三个步骤实现数据加密传输,无需复杂配置,普通用户也能轻松掌握。读完本文你将学会: - 识别JSON-Server默认传输的安全风险 - 使用中间件实现请求数据加密 - 配置HTTPS实现传输层安全防护 - 验证加密效果的两种实用方法 ## 安全风险:为什么需要加...
Python爬虫实战:JSON解析与HTTPS代理应用
JSON作为轻量级数据交换格式,在Web开发中广泛用于前后端通信。其基于键值对的结构设计,配合Python的json模块可实现快速序列化与反序列化。在爬虫开发中,正确处理JSON数据是获取结构化信息的关键步骤,特别是在处理API接口响应时。HTTPS协议通过SSL/TLS加密保障通信安全,但爬虫常需处理证书验证问题,合理配置代理IP和请求头能有效应对反爬机制。本文以KFC门店数据爬取为例,演示requests库处理JSON响应、SSL证书验证的三种方案,以及高匿代理的实战配置技巧。
JSON Server
Table of contents https://github.com/iisunnyboy/user-app Sponsorship Getting started Routes Plural routes Singular routes Filter Paginate Sort Slice Operators Full-text search Rel...
Vivado FFT IP核配置与实战:FPGA信号处理硬件加速指南
快速傅里叶变换(FFT)是数字信号处理(DSP)中的核心算法,用于将时域信号转换到频域进行分析。其原理基于离散傅里叶变换(DFT),通过蝶形运算的分解与复用,大幅降低了计算复杂度。在工程实践中,软件实现的FFT难以满足高速实时处理的需求,因此硬件加速方案至关重要。FPGA凭借其并行架构和可定制性,成为实现高性能FFT的理想平台。通过集成专用的FFT IP核,如Vivado中的Pipelined Streaming I/O架构,可以构建流水线化的计算引擎,实现极低延迟和高吞吐量的连续数据流处理。这种硬件方案特
Surface Go 2 变身 Linux 开发本:保姆级 Ubuntu 20.04 双系统安装与驱动配置全攻略
本文详细介绍了如何将 Surface Go 2 变身为高效的 Linux 开发本,涵盖 Ubuntu 20.04 双系统安装、专用内核配置、驱动优化等全流程。通过 linux-surface 内核安装和硬件驱动优化,确保 Surface Go 2 的触控、笔输入、摄像头等功能完美运行,适合开发者打造便携生产力工具。
使用json-server-auth为json-server添加HTTP请求加密功能
在开发过程中,我们经常使用json-server来快速搭建REST API服务进行前端开发和测试。然而,默认情况下json-server并不提供任何安全机制,所有数据都是公开可访问的。本文将介绍如何通过json-server-auth为json-server添加请求加密和认证功能,确保只有授权用户才能访问数据。 ## json-server的安全性问题 json-server作为一个轻量级的R...
把MinerU集成到Dify
本文介绍了如何将本地部署的MinerU与Dify平台进行集成。首先需要确保Dify和MinerU在Docker环境中正常运行,并通过配置虚拟网络实现互联。然后详细说明了在Dify平台安装MinerU插件的步骤,包括从插件市场搜索安装、配置连接参数等关键操作。特别强调了要等待MinerU容器完全启动(healthy状态)后再进行Dify配置,否则会出现连接错误。通过简单的URL指向和API密钥设置,用户即可实现Dify平台与本地MinerU算力网络的对接,为后续的AI应用开发提供基础支持。
ESP32 HTTPS Server 项目教程
ESP32 HTTPS Server 项目教程 1. 项目的目录结构及介绍 esp32_https_server/ ├── docs/ │ └── ... # 项目文档文件 ├── examples/ │ └── ... # 示例代码文件 ├── extras/ │ └── ... # 额外资源文件 ├── src/ │ └── ... # 源代码文件 ├── .edito...
【新华三】通过路由复制实现Public与VRF路由互通
如上图所示,S6900设备里有两张表,一张是public路由表,默认所有的路由都存放在public路由表里;除此之外还创建了VRF test,因此此设备还有VRF test路由表。通过路由复制实现Public路由和VRF路由互通,默认情况下VRF里的路由单独一张路由表,默认情况下与public路由表相互隔离,两张表之间不可互访。此时的public路由表里面并没有test的路由表。public路由表与VRF路由表之间相互隔离。此时VRF test里的路由也没有其他VRF或Public里的路由,相互隔离。
BankAPI API接口实战教程:JSON-RPC与HTTPS POST的完整实现指南
BankAPI是一个为金融机构设计的安全分布式消息系统,支持银行间通过JSON-RPC和HTTPS POST协议进行加密消息传输。本教程将带你从零开始掌握BankAPI接口的核心功能与实战应用,轻松实现金融级安全通信。 ## 一、BankAPI系统架构概览 BankAPI基于PostgreSQL数据库和Apache Web服务器构建,采用三层架构设计确保金融信息传输的安全性和可靠性。系统核心由
基于Godot 4的战术RPG开发:模块化架构与核心系统实现
在游戏开发领域,模块化架构和回合制战斗系统是构建复杂策略游戏的基础。模块化设计通过关注点分离,将游戏逻辑分解为独立、可复用的组件,如数据模型、功能模块和场景,从而提升代码的可维护性和扩展性。回合制战斗系统则依赖于清晰的状态机循环,管理从单位选择、行动决策到伤害结算的完整流程,这是策略游戏体验的核心。这些技术为独立开发者提供了高效起点,能快速验证游戏原型。本文聚焦于一个专为Godot 4引擎设计的开源战术RPG模板,它正是运用了模块化架构和回合制状态机,实现了网格移动、相机控制和基础AI等核心功能。该模板通过
如何快速配置Obsidian Local REST API:HTTPS与API Key安全终极指南
你是否希望在保持安全的前提下,为Obsidian笔记自动化提供强大的API接口?Obsidian Local REST API正是你需要的解决方案。这款插件通过安全的HTTPS连接和API Key认证,为你的脚本、浏览器扩展和AI代理提供了与Obsidian保险库的直接连接通道。本文将深入解析如何正确配置HTTPS证书和API Key保护机制,确保你的笔记数据在自动化流程中始终保持安全。 ##
X书关键词协议搜索
【代码】X书关键词协议搜索。
WCK Operation (WCK 操作)
LPDDR6 SDRAM采用双时钟系统(WCK和CK),其中WCK频率是CK的两倍。为确保数据正确传输,需通过WCK2CK同步操作使两种时钟对齐。LPDDR6支持两种同步模式:Auto-sync off模式和WCK Always on模式,可通过MR22寄存器选择。同步操作由特定命令(Read/Write/MRR等)触发,需在满足特定时序参数(如tWCKENL、tWCKPRE等)后完成。同步前必须完成WCK2CK训练,且不同操作(读取/写入/CAS)有各自的时序要求。该机制确保数据在正确时钟相位下传输,是L
Lightbug HTTP实战教程:构建高并发JSON API服务
Lightbug HTTP是一款为Mojo语言打造的轻量级高性能HTTP框架,以其简洁设计和卓越性能成为构建高并发API服务的理想选择。本教程将带你从零开始搭建一个功能完善的JSON API服务,掌握Lightbug HTTP的核心优势与实战技巧。 ## 🚀 为什么选择Lightbug HTTP? Lightbug HTTP作为Mojo生态中的新兴框架,正处于快速发展阶段。从项目路线图可以清
TMS_WebGMaps_1.9.8.0_Full_Source
TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder
K8s 核心组件——API Server
Kubernetes API Server(API Server)是 Kubernetes 的核心组件之一,负责暴露 Kubernetes API 给用户和客户端,接收和处理来自客户端的请求,并将其存储到 etcd 中。Kubernetes API Server 主要作用是提供 Kubernetes 各类资源对象(如 Pod、Deployment、Service等)的增、删、改、查及 Watch 等 HTTP REST 接口,是集群内各个功能模块直接数据交互和通信的中心枢纽,是整个系统的数据总线和数据中心。
android 蓝牙通讯demo
android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。
C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片
基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正
Kubernetes API Server详解
Kubernetes API Server 是 Kubernetes 控制平面的核心组件,负责处理所有 RESTful API 请求,管理集群状态,并作为集群内部和外部通信的网关。以下是其核心功能和架构的详细解析。
Camera2Demo
在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作
5分钟上手API Sprout:轻量级OpenAPI 3 Mock Server安装与启动教程
API Sprout 是一款轻量级、速度极快的跨平台 OpenAPI 3 Mock Server,支持请求验证功能,能帮助开发者快速搭建模拟服务进行接口测试。本文将带你快速完成安装与启动,5分钟内即可体验高效的API模拟服务。 ## 三种快速安装方式 ### Docker 一键部署 🐳 Docker 是安装 API Sprout 最便捷的方式,无需复杂配置即可快速启动: ```bash
C++实现 Https Server 支持 restful json:安全高效的Web服务解决方案
C++实现 Https Server 支持 restful json:安全高效的Web服务解决方案 去发现同类优质开源项目:https://gitcode.com/ 在现代网络应用中,安全与高效的通讯协议至关重要。C++实现 Https Server 支持 restful json 项目的出现,为开发者提供了一种安全、灵活且实用的Web服务解决方案。下面我们将详细探讨这个项目的核心功能、技术背景、...
为什么JSON-Mask比JSONPath更适合API响应过滤?深度解析
在API开发中,数据过滤是提升性能和用户体验的关键环节。JSON-Mask作为一款轻量级的数据过滤工具,凭借其独特的设计理念和高效的处理方式,正在成为开发者的首选。本文将深入探讨JSON-Mask相比JSONPath的核心优势,帮助你理解为什么它更适合API响应过滤场景。 ## 什么是JSON-Mask? JSON-Mask是一个用于选择JS对象特定部分的微型语言和引擎,它能够隐藏或过滤掉不需
C++编程: 基于cpp-httplib和nlohmann/json实现简单的HTTP Server
本文基于 cpp-httplib 和 nlohmann/json 实现简单的 HTTPS Server 实例代码,这两个库均是head-only的。
RESTful API接口规范
RESTful规范 Restful API是目前比较成熟的一套互联网应用程序的API设计理念,Rest是一组架构约束条件和原则,如何Rest约束条件和原则的架构,我们就称为Restful架构,Restful架构具有结构清晰、符合标准、易于理解以及扩展方便等特点,受到越来越多网站的采用! Restful API接口规范包括以下部分: 一、协议 API与用户的通信协议,总是使用HTTPs协议。 二、域名 应该尽量将API部署在专用域名之下,如https://api.专属域名.com;如果确定
MicroWebSrv高级应用:如何集成JSON API与前端框架
MicroWebSrv 是一款专为 MicroPython 打造的微型 HTTP Web 服务器,支持 WebSockets、Python 模板渲染与路由处理器,常被用在 ESP32 和 Pycom 等嵌入式设备上。仅需 3 个文件,你就能在单片机里跑起一个完整的前后端应用——从 JSON API 接口到前端页面全部搞定。这篇文章将带你快速掌握 MicroWebSrv 集成 JSON API 与前
JSONPlaceholder vs Mock.js vs JSON Server:3种前端Mock方案深度对比
本文深度对比了三种主流前端Mock方案:JSONPlaceholder、Mock.js和JSON Server,从零配置、灵活性、数据可控性、部署复杂度四个维度进行全面评测。JSONPlaceholder适合快速原型设计,Mock.js提供高度灵活的数据模拟,而JSON Server则支持完整的REST API功能。文章还提供了性能测试和选型指南,帮助开发者根据项目需求选择最适合的Mock工具。
389



被折叠的 条评论
为什么被折叠?



