File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed 
lib/rspec_api_documentation/dsl Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -38,19 +38,21 @@ def do_request(extra_params = {})
3838      if  method  == :get  && !query_string . blank? 
3939        path_or_query  += "?#{ query_string }  " 
4040      else 
41-         formatter  =  RspecApiDocumentation . configuration . post_body_formatter 
42-         case  formatter 
43-         when  :json 
44-           params_or_body  =  params . to_json 
45-         when  :xml 
46-           params_or_body  =  params . to_xml 
47-         when  Proc 
48-           params_or_body  =  formatter . call ( params ) 
41+         if  respond_to? ( :raw_post )  
42+           params_or_body  =  raw_post 
4943        else 
50-           params_or_body  =  params 
44+           formatter  =  RspecApiDocumentation . configuration . post_body_formatter 
45+           case  formatter 
46+           when  :json 
47+             params_or_body  =  params . to_json 
48+           when  :xml 
49+             params_or_body  =  params . to_xml 
50+           when  Proc 
51+             params_or_body  =  formatter . call ( params ) 
52+           else 
53+             params_or_body  =  params 
54+           end 
5155        end 
52- 
53-         params_or_body  =  respond_to? ( :raw_post )  ? raw_post  : params_or_body 
5456      end 
5557
5658      rspec_api_documentation_client . send ( method ,  path_or_query ,  params_or_body ,  headers ) 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments