original_docstring: Harmonizes the request of GET and POST for the search endpoint
  
      Args:
          request: QueryDict
  
      Returns: Copy of the harmonized QueryDict
      
docstring: Harmonizes the request of GET and POST for the search endpoint
docstring_tokens: Harmonizes the request of GET and POST for the search endpoint
code: def harmonize_post_get_for_search(request):
      '''Harmonizes the request of GET and POST for the search endpoint
  
      Args:
          request: QueryDict
  
      Returns: Copy of the harmonized QueryDict
      '''
      # POST
      if request.method == 'POST':
          query_param = request.data.copy()
          if 'bbox' in query_param:
              query_param['bbox'] = json.dumps(query_param['bbox']).strip('[]')  # to string
          if 'query' in query_param:
              query_param['query'] = json.dumps(query_param['query'])  # to string
  
      # GET
      else:
          query_param = request.GET.copy()
          if 'ids' in query_param:
              query_param['ids'] = query_param['ids'].split(',')  # to array
          if 'collections' in query_param:
              query_param['collections'] = query_param['collections'].split(',')  # to array
      return query_param
code_tokens: def harmonize_post_get_for_search ( request ) : if request . method == 'POST' : query_param = request . data . copy ( ) if 'bbox' in query_param : query_param [ 'bbox' ] = json . dumps ( query_param [ 'bbox' ] ) . strip ( '[]' ) if 'query' in query_param : query_param [ 'query' ] = json . dumps ( query_param [ 'query' ] ) else : query_param = request . GET . copy ( ) if 'ids' in query_param : query_param [ 'ids' ] = query_param [ 'ids' ] . split ( ',' ) if 'collections' in query_param : query_param [ 'collections' ] = query_param [ 'collections' ] . split ( ',' ) return query_param
short_docstring: Harmonizes the request of GET and POST for the search endpoint
short_docstring_tokens: Harmonizes the request of GET and POST for the search endpoint
comment: '''Harmonizes the request of GET and POST for the search endpoint
  
      Args:
          request: QueryDict
  
      Returns: Copy of the harmonized QueryDict
      '''$SEP$# POST$SEP$# to string$SEP$# to string$SEP$# GET$SEP$# to array$SEP$# to array