Register through API

Viewed 34

How to register through API in Laravel ? I am getting error "Only json request are allowed with header 'Accept': 'application/json'".

enter image description here

1 Answers

I think I am replying too late but hope this helps.

You need to send data as this shown in image.

  • Go to body
  • Change Text to JSON (last option)
  • Provide register info as JSON

enter image description here

When sending request from within code if (using any javascript library) you need to use JSON.stringify() on body before sending request

Related