function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
troungertrounger 

regarding displaying rest json data on browser

hi guys i wrote a rest program like this 

 

@RestResource(urlMapping='/json1/*')
global with sharing class restclass
{
 @HttpPOST
   global static list<Account> getaccount()
   {
       list<Account> acclist = new list<Account>([Select id,Name,billingcity
       from account]);
       return acclist;
       }

 

but i want to display data on browser like if some one hit the method  url it has to display json data regarding all accounts

please help me to solve this issue