menu

Theia

Eclipse Theia - Cloud & Desktop IDE

Channels
Team
Anton Kosyakov
@anton-kosyakov
Marc Dumais
@marc-dumais
Vince Fugnitto
@vince-fugnitto
Sven Efftinge
@svenefftinge
Jacques Bouthillier
@jacques-bouthillier
Florent BENOIT
@florentbenoit
Akos Kitta
@kittaakos
Rob Moran
@thegecko
Paul Maréchal
@marechal-p
Casey Flynn
@caseyflynn
Anatoliy Bazko
@abazko
Artem Zatsarynnyi
@artem-z
Gorkem Ercan
@gercan
Liang
@elaihau
Simon Marchi
@simark
Jan Bicker
@jbicker
Alex Tugarev
@alex-tugarev
Miro Spönemann
@spoenemann
Posts
Chat
Members
Info
Show previous messages

April 27, 2020 at 6:56am
creating a new thread is better, otherwise answers get lost in the chat and not very useful to reference later
  • reply
  • like
From a user perspective? Or you have a custom Theia product/extension?
  • reply
  • like
I believe there is not such preference from user perspective. Please file an issue if so.
  • reply
  • like
From extension developer perspective you should be able to pass area: left to open(OpenerService, uri, { preview: true, area: 'left' })
  • reply
  • like
From a user perspective? Or you have a custom Theia product/extension?
From a user perspective.
  • reply
  • like

April 28, 2020 at 6:41am
Could you comment here about your motivation here: https://github.com/eclipse-theia/theia/issues/7679 Is it about RTL support?
  • reply
  • like

April 29, 2020 at 10:52am
hey hey, is there a smart way to receive data from an api besides the example on json_rpc? simply using fetch() doesn't seam to work
  • reply
  • like
Could you elaborate what api? Do you provide HTTP endpoint using the express.js APIs? HTTP(s) uri for such endpoints can be created like here: https://github.com/eclipse-theia/theia/blob/1ca3ec37c079a6b316278cf292609653e57b8151/packages/filesystem/src/browser/download/file-download-service.ts#L165-L167
Edited
  • reply
  • like
Could you elaborate what api? Do you provide HTTP endpoint using the express.js APIs? HTTP(s) uri for such endpoints can be created like here: https://github.com/eclipse-theia/theia/blob/1ca3ec37c079a6b316278cf292609653e57b8151/packages/filesystem/src/browser/download/file-download-service.ts#L165-L167
i want to display data from a fake data source like this: https://pastebin.com/raw/deHptpvF and show it in a custom widget
  • reply
  • like
ok, what do you mean by fetch does not work? What kind of errors? CORS?
  • reply
  • like
no it does not respond at all i tried:
fetch("https://pastebin.com/raw/deHptpvF")
.then(res => res.json())
.then( res => console.log(res))
  • reply
  • like
ok, what do you mean by fetch does not work? What kind of errors? CORS?
silly me... i need to catch the error to display it :-( root INFO TypeError: NetworkError when attempting to fetch resource.
  • reply
  • like
silly me... i need to catch the error to display it :-( root INFO TypeError: NetworkError when attempting to fetch resource.
this is because the widget runs as a frontend module right?
  • reply
  • like
this is because the widget runs as a frontend module right?
  • reply
  • like
it should not be matter, fetch is browser API, only if you try to pull some fetch node.js implementation and use it in the browser...
  • reply
  • like
Do you have any other errors?
  • reply
  • like
Are you sure that pastebin.com allows cross domain requests?
  • reply
  • like

April 29, 2020 at 11:07pm
Are you sure that pastebin.com allows cross domain requests?
no, not for sure
  • reply
  • like

April 30, 2020 at 6:31am
You can inspect response headers for value of Access-Control-Allow-Origin or other CORS headers.
  • reply
  • like

May 13, 2020 at 9:09am
Hey again. Sorry to bug you, but i cant get a request to another page/service to work. I really think i am missing something here. My Scenario: i created an extension like in the example. The example creates a method called: displayMessage(). I extended this method with:
fetch('http://example.com/api/node', {
mode: "no-cors",
method: "GET",
headers: {
"Accept": "application/json"
}})
  • reply
  • like
according to several stackoverflow links this should work, but it does not ^^
  • reply
  • like
of cause i changed the url to my service aswell :)
  • reply
  • like
Could you share a reproducible repo?
  • reply
  • like
1 sec
  • reply
  • like
Could you share a reproducible repo?
  • reply
  • like
Show more messages