跳转至

2020-11-0x04

Keywords: Python leancloud ABAP

Share

Chrome extension ReRes

annnhan/ReRes

一个可以修改响应请求的 Chrome 插件,可以修改某些静态资源重定向到 cdn 上

JSON Server

repo: typicode/json-server

npm install -g json-server

可以修改定制路由,也可以定制开发

请求两个 json files

issue: typicode/json-server#1035

import * as categories from 'categories.json';
import * as suppliers from 'suppliers.json';

const db = {categories, suppliers};

GraphQL is not OData

https://jeffhandley.com/2018-09-13/graphql-is-not-odata

GraphQL is not OData. Can we please stop casting OData’s flaws onto GraphQL? At Microsoft, I used and propagated OData against my own judgment. I’m sorry I couldn’t stop the train wreck. At Concur, we successfully employ GraphQL over top of RESTful APIs. Feel free to @ me. — Jeff Handley (@JeffHandley) August 29, 2018

No more free work from Marak - Pay Me or Fork This

Marak/faker.js#1046

Tutorials

ABAP create oData

https://wechris.github.io/tips-tutorials/sap/sap%20netweaver%20gateway/odata/2017/11/19/building-your-first-simple-gateway-service/

Note

ABAP Serializer and Deserializer

https://wechris.github.io/tips-tutorials/sap/abap/json/2018/02/12/ABAP-to-JSON-and-JSON-to-ABAP/

* serialize table lt_flight into JSON, skipping initial fields and converting ABAP field names into camelCase
    LV_JSON = /UI2/CL_JSON=>SERIALIZE( DATA = LT_FLIGHT COMPRESS = ABAP_TRUE PRETTY_NAME = /UI2/CL_JSON=>PRETTY_MODE-CAMEL_CASE ).

    " Display JSON in ABAP
    CALL TRANSFORMATION SJSON2HTML SOURCE XML LV_JSON
                               RESULT XML DATA(LVC_HTML).
    CL_ABAP_BROWSER=>SHOW_HTML( TITLE = 'ABAP (iTab) -> JSON: /ui2/cl_json=>serialize' HTML_STRING = CL_ABAP_CODEPAGE=>CONVERT_FROM( LVC_HTML ) ).

    CLEAR LT_FLIGHT.

* deserialize JSON string json into internal table lt_flight doing camelCase to ABAP like field name mapping
    /UI2/CL_JSON=>DESERIALIZE( EXPORTING JSON = LV_JSON PRETTY_NAME = /UI2/CL_JSON=>PRETTY_MODE-CAMEL_CASE CHANGING DATA = LT_FLIGHT ).

MDN cache control

https://developer.mozilla.org/zh-CN/docs/Web/HTTP/Headers/Cache-Control

Cache-Control: max-age=<seconds>
Cache-Control: max-stale[=<seconds>]
Cache-Control: min-fresh=<seconds>
Cache-control: no-cache 
Cache-control: no-store
Cache-control: no-transform
Cache-control: only-if-cached

最后更新: 2021-02-01
创建日期: 2020-11-24