{"id":942,"date":"2017-08-03T14:13:48","date_gmt":"2017-08-03T12:13:48","guid":{"rendered":"https:\/\/2017.nijmegen.wordcamp.org\/?post_type=wcb_session&#038;p=942"},"modified":"2017-08-21T15:05:29","modified_gmt":"2017-08-21T13:05:29","slug":"using-psr-7-middleware-in-your-restful-wordpress-projects","status":"publish","type":"wcb_session","link":"https:\/\/nijmegen.wordcamp.org\/2017\/session\/using-psr-7-middleware-in-your-restful-wordpress-projects\/","title":{"rendered":"Using PSR-7 Middleware in Your RESTful WordPress Projects (EN)"},"content":{"rendered":"<p>In the PHP world in general, there is a standard (recommendation) when it comes to HTTP messages: PSR-7. Despite things like Calypso, Gutenberg and the growing JavaScript codebase in general, WordPress is written in PHP. Thus, wouldn&#8217;t it be nice to do what the rest of the PHP world is doing? Isn&#8217;t there some way to leverage all the existing PSR-7 middleware and incorporate them into the WordPress REST API? Well, there is.<\/p>\n<p>In this talk, Thorsten will give an overview of the PSR-7 HTTP message interfaces. After that, he will compare these with the structures of WordPress Core, and analyze whether or not they match with the PSR-7 interfaces. Finally, Thorsten will provide a closer look into an example implementation of PSR-7-compliant WordPress REST requests and responses, respectively, and explain their inner workings.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the PHP world in general, there is a standard (recommendation) when it comes to HTTP messages: PSR-7. Despite things like Calypso, Gutenberg and the growing JavaScript codebase in general, WordPress is written in PHP. Thus, wouldn&#8217;t it be nice to do what the rest of the PHP world is doing? Isn&#8217;t there some way &hellip; <a href=\"https:\/\/nijmegen.wordcamp.org\/2017\/session\/using-psr-7-middleware-in-your-restful-wordpress-projects\/\" class=\"more-link\">Lees verder <span class=\"screen-reader-text\">Using PSR-7 Middleware in Your RESTful WordPress Projects (EN)<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":14599396,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1504362000,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[935],"footnotes":""},"session_track":[13411],"session_category":[],"class_list":["post-942","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-track-1"],"jetpack_shortlink":"https:\/\/wp.me\/p8keE7-fc","jetpack_sharing_enabled":true,"session_date_time":{"date":"2 september 2017","time":"16:20"},"session_speakers":[{"id":"935","slug":"thorsten-frommen","name":"Thorsten Frommen","link":"https:\/\/nijmegen.wordcamp.org\/2017\/speaker\/thorsten-frommen\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/nijmegen.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/942","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nijmegen.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/nijmegen.wordcamp.org\/2017\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":2,"href":"https:\/\/nijmegen.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/942\/revisions"}],"predecessor-version":[{"id":2116,"href":"https:\/\/nijmegen.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/942\/revisions\/2116"}],"speakers":[{"embeddable":true,"href":"https:\/\/nijmegen.wordcamp.org\/2017\/wp-json\/wp\/v2\/speakers\/935"}],"author":[{"embeddable":true,"href":"https:\/\/nijmegen.wordcamp.org\/2017\/wp-json\/wporg\/v1\/users\/tfrommen"}],"wp:attachment":[{"href":"https:\/\/nijmegen.wordcamp.org\/2017\/wp-json\/wp\/v2\/media?parent=942"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/nijmegen.wordcamp.org\/2017\/wp-json\/wp\/v2\/session_track?post=942"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/nijmegen.wordcamp.org\/2017\/wp-json\/wp\/v2\/session_category?post=942"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}