Talk:Wikimedia Apps/Team/RESTBase services for apps

About this board

MHolloway (WMF) (talkcontribs)

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?

Reply to "Rename this page?"

406 response from restbase service

2
TheNetStriker (talkcontribs)

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?

Mobrovac-WMF (talkcontribs)

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.

There are no older topics