smm_core/internal/services/requests.restbook

1 line
3.4 KiB
Plaintext

[{"kind":1,"language":"markdown","value":"# Добавление пользователя","outputs":[]},{"kind":2,"language":"rest-book","value":"POST http://localhost:8090/users\n\n{\n \"username\": \"foo\"\n}","outputs":[{"mime":"x-application/rest-book","value":{"status":200,"statusText":"OK","headers":{"Date":"Wed, 20 Nov 2024 16:14:45 GMT","Content-Type":"application/json","Content-Length":"25"},"config":{"timeout":10000,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json","User-Agent":"rest-book","Content-Length":18}},"request":{"method":"POST","httpVersion":"1.1","responseUrl":"http://localhost:8090/users","timeout":10000,"headers":{"User-Agent":"rest-book"},"data":{"username":"foo"}},"data":{"id":1,"username":"foo"}}},{"mime":"text/x-json","value":{"status":200,"statusText":"OK","headers":{"Date":"Wed, 20 Nov 2024 16:14:45 GMT","Content-Type":"application/json","Content-Length":"25"},"config":{"timeout":10000,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json","User-Agent":"rest-book","Content-Length":18}},"request":{"method":"POST","httpVersion":"1.1","responseUrl":"http://localhost:8090/users","timeout":10000,"headers":{"User-Agent":"rest-book"},"data":{"username":"foo"}},"data":{"id":1,"username":"foo"}}},{"mime":"text/html","value":"[object Object]"}]},{"kind":1,"language":"markdown","value":"# Добавление категории","outputs":[]},{"kind":2,"language":"rest-book","value":"POST http://localhost:8090/categories\nUser-Id: 1\n\n{\n \"name\": \"Продукты питания\"\n}","outputs":[{"mime":"x-application/rest-book","value":{"status":500,"statusText":"Internal Server Error","headers":{"Date":"Wed, 20 Nov 2024 16:25:26 GMT","Content-Type":"application/json","Content-Length":"184"},"config":{"timeout":10000,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json","User-Id":"2","User-Agent":"axios/0.21.4","Content-Length":42}},"request":{"method":"POST","httpVersion":"1.1","responseUrl":"http://localhost:8090/categories","timeout":10000,"headers":{"User-Id":"2"},"data":{"name":"Продукты питания"}},"data":{"code":2,"message":"unable to insert row: ERROR: insert or update on table \"categories\" violates foreign key constraint \"categories_user_id_fkey\" (SQLSTATE 23503)","details":[]}}},{"mime":"text/x-json","value":{"status":500,"statusText":"Internal Server Error","headers":{"Date":"Wed, 20 Nov 2024 16:25:26 GMT","Content-Type":"application/json","Content-Length":"184"},"config":{"timeout":10000,"xsrfCookieName":"XSRF-TOKEN","xsrfHeaderName":"X-XSRF-TOKEN","headers":{"Accept":"application/json, text/plain, */*","Content-Type":"application/json","User-Id":"2","User-Agent":"axios/0.21.4","Content-Length":42}},"request":{"method":"POST","httpVersion":"1.1","responseUrl":"http://localhost:8090/categories","timeout":10000,"headers":{"User-Id":"2"},"data":{"name":"Продукты питания"}},"data":{"code":2,"message":"unable to insert row: ERROR: insert or update on table \"categories\" violates foreign key constraint \"categories_user_id_fkey\" (SQLSTATE 23503)","details":[]}}},{"mime":"text/html","value":"[object Object]"}]}]