title: Is there any direct way to get the server relative URL of document library using its title using Rest API?
body: <p>Presently I am using the following method to get the server relative URL</p>
  
  <pre><code>function getLibraryUrl(nameOrUrl)
      {
          var ctx = SP.ClientContext.get_current();
          var list = ctx.get_web().get_lists().getByTitle(nameOrUrl);
          ctx.load(list,'RootFolder');
          ctx.executeQueryAsync(
                              function(){
                              var url=list.get_rootFolder().get_serverRelativeUrl();
                              return url;
                              },
                              function(sender, args)
                                      {
  
       });    
      }
  </code></pre>
  
  <p>But, I don't want to use the asynchronous call. Can any one please guide me to get the server relative URL of document library using rest API.</p>
  
  <p>Something like this
  /_api/Web/Lists/getByTitle('')/items?$select=File/ServerRelativeUrl&amp;$expand=File</p>