How interact between a website and REST Client

118 Views Asked by At

I have a website that generates different JSON that need to be used in the future request.

The request could be done by CURL but I'll use the Advanced Rest Client to send the request.

The website is in PHP. Advanced REST Client is a pluggin of Chrome.

Do you know how I could generate my request in the REST Client from the website without copy and paste the JSON code?

I've tried by curl but it doesn't work. The json used in the REST client is working

Just need to make a tunnel between the website and the REST Client with any JSON file

1

There are 1 best solutions below

1
Quentin On

Do you know how I could generate my request in the REST Client from the website

You can't.

Advanced REST Client is primarily a debugging tool. It isn't designed to be used by websites.

If you want to make an HTTP request to a RESTful web service from a website then either:

  • Write client-side code in JavaScript that uses fetch, XMLHttpRequest or a library that wraps one of them such as axios or
  • Write server-side code in your server-side language of choice and generate whole HTML pages on demand.