Jump to content

Talk:Wikimedia Apps/Team/RESTBase services for apps

Add topic
From mediawiki.org
Latest comment: 6 years ago by MHolloway (WMF) in topic Rename this page?

406 response from restbase service

[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I've configured the mobile restbase service to use Parsoid directly. But I'm always getting a 406 response from the service. Here is the output from the console:

{"name":"service-mobileapp-node","hostname":"ubuntux64","pid":25665,"level":10,"msg":"outgoing request","to":"http://localhost:8142/localhost/v3/page/html/Hauptseite","levelPath":"trace/restApiGet","time":"2019-05-24T11:55:57.449Z","v":0}

{"name":"service-mobileapp-node","hostname":"ubuntux64","pid":25665,"level":10,"msg":"outgoing request","to":"http://localhost/mediawiki/api.php?format=json&formatversion=2&action=query&prop=coordinates%7Cdescription%7Cpageprops%7Cpageimages%7Crevisions%7Cinfo%7Clanglinks&titles=Hauptseite&pilicense=any&piprop=thumbnail%7Coriginal%7Cname&pithumbsize=1024&inprop=protection&lllimit=max&rvprop=ids%7Ctimestamp%7Cuser%7Ccontentmodel&rvslots=main","levelPath":"trace/mwApiGet","time":"2019-05-24T11:55:57.451Z","v":0}

{"name":"service-mobileapp-node","hostname":"ubuntux64","pid":25665,"level":30,"message":"406","status":406,"type":"internal_error","detail":"Not acceptable.\ntext/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/[object Object]"\ntext/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/[object Object]"\ntext/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/[object Object]"\n","request_id":"e435a080-7e1a-11e9-a790-b1e83154e4a6","request":{"url":"/localhost/v1/page/mobile-sections/Hauptseite","headers":{"cache-control":"max-age=0","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36","x-request-id":"e435a080-7e1a-11e9-a790-b1e83154e4a6"},"method":"GET","params":{"0":"/localhost/v1/page/mobile-sections/Hauptseite"},"query":{},"remoteAddress":"172.17.128.204","remotePort":59326},"levelPath":"info/406","msg":"406","time":"2019-05-24T11:55:57.465Z","v":0}

I've tested both url's from the first two requests and they are working. What am I doing wrong? TheNetStriker (talk) 12:01, 24 May 2019 (UTC)Reply

The problem seems to be the Accept header you are sending. From the logs, it appears you are sending text/html; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/HTML/[object Object]". try without an accept header first and see if that helps. Mobrovac-WMF (talk) 07:56, 26 November 2019 (UTC)Reply
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Rename this page?

[edit]

RESTBase as we know it is going away. Also, the fact that these services are currently backed by RESTBase is not the most interesting thing about them, and probably doesn't need to be in the page title.

What about one of the following:

- Node.js services for apps

- Content services for apps

- Structured wiki content services

Or something else? MHolloway (WMF) (talk) 22:22, 5 May 2020 (UTC)Reply