# selectOptions actions 1개 body 구성후 request 방법

**URL:** <https://ask.selectfromuser.com/t/selectoptions-actions-1-body-request/149>\
**Category:** 사용 팁\
**Tags:** javascript, requestfn, actions, selectoptions, valuefromselectedrow\
**Created:** [4월 25, 2024, 8:25오전 UTC](https://ask.selectfromuser.com/t/selectoptions-actions-1-body-request/149 "2024-04-25T08:25:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hbkim](https://yyz2.discourse-cdn.com/flex032/user_avatar/ask.selectfromuser.com/hbkim/32/23_2.png) [@hbkim](https://ask.selectfromuser.com/u/hbkim)\
**Post date:** [4월 25, 2024, 8:25오전 UTC](https://ask.selectfromuser.com/t/selectoptions-actions-1-body-request/149/1 "2024-04-25T08:25:22Z")

</div>

selectOptions + actions 실행시 기본적으로 개별 row 내역을 하나씩 실행하게 됩니다.

각각의 request를 연속적으로 여러번 보내는것이 아닌

body를 구성하여 request를 한번 보내는 방법을 안내드립니다.

관련하여 궁금하신 점은 문의주세요. 감사합니다.

```yaml
selectOptions:
  enabled: true
actions:
  - label: http 호출
    type: http
    axios: 
      method: POST
      url: https://jsonplaceholder.typicode.com/posts
      body: "{{ body.value }}"
    params:
      - key: id
        valueFromSelectedRows: true
      - key: name
        valueFromSelectedRows: true
      - key: body
        hidden: true    
    toast: 요청 완료
    requestFn: |
      const id = params.find(e => e.key == 'id')
      const name = params.find(e => e.key == 'name')
      const body = params.find(e => e.key == 'body')

      body.value = id.value.map( (e, i) => {
        return {
          id: id.value[i],
          name: name.value[i],
        }
      })

```
