Ant maven plugin通过curl发送Post请求

原始curl请求:

curl -H 'Content-Type: application/json' -s -XPOST $url -d '{"id":0,"work":"extractor","name":"hehe","type":"CPU"}'

方法一

            
                org.apache.maven.plugins
                maven-antrun-plugin
                1.8
                
                    
                        build
                        verify
                        
                            run
                        
                        
                            
                               
                                    
                                    
                              
                            
                        
                    
                
            

方法二

注意下面不需要加单引号'

                            
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                    
                                

你可能感兴趣的:(Ant maven plugin通过curl发送Post请求)