java - CloudEndpoints: what is autogenerated "patch" API method and how to use it? -


after adding 2 methods @api annotaged class: get() , update(), there 3 methods generated endpoints:

  • *.get generated directly get() method
  • *.update generated directly update() method
  • *.patch seems generated indirectly, after inserting both get() , update() methods annotated class.

i can see 3 methods via apis explorer on local server. code used generate endpoint posted @ end of question.

my question is: why third method, patch, being generated? there on purpose? if yes, how use method? usable external clients or served internal usage?

here endpoint api class:

@api (name = "sample_endpoint") public class sampleendpoint {     public entity get()     {         return new entity();     }      public entity update(entity entity)     {         return entity;     }      public class entity     {         public string parameter = "validated ok.";         public string getparameter() { return parameter; }     } } 

the "patch" method autogenerated when create method called "update". partial updates , available external clients.

usage: takes id of entity parameter , can send data fields want change.

see patch explanation.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -