You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2021/03/30 21:45:20 UTC

[GitHub] [solr] thelabdude commented on a change in pull request #42: SOLR-15277: Schema designer UI and supporting backend

thelabdude commented on a change in pull request #42:
URL: https://github.com/apache/solr/pull/42#discussion_r604452376



##########
File path: solr/webapp/web/js/angular/services.js
##########
@@ -254,6 +254,17 @@ solrAdminServices.factory('System',
        get: {method: "GET"}
      })
 }])
+.factory('SchemaDesigner',
+   ['$resource', function($resource) {
+     return $resource('/api/schema-designer/:path', {wt: 'json', path: '@path', _:Date.now()}, {
+       get: {method: "GET"},
+       post: {method: "POST"},
+       put: {method: "PUT"},
+       postXml: {headers: {'Content-type': 'text/xml'}, method: "POST"},
+       postCsv: {headers: {'Content-type': 'application/csv'}, method: "POST"},
+       upload: {method: "POST", transformRequest: angular.identity, headers: {'Content-Type': undefined} }

Review comment:
       Hi @MarcusSorealheis, thanks for taking a look ...
   
   With jQuery, the default content-type is always `application/json` except where I've declared it explicitly. Almost all of the API calls the designer makes to the backend send and expect JSON.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org