ghttp_copy_request_body_into_buffer   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/libs/external/ghttp.xtm

Implementation

(bind-func ghttp_copy_request_body_into_buffer
  (lambda (request:ghttp_request* buf:i8* bufsize:i64)
    (if (null? request)
        (println "Error: request is null.")
        (let ((bytes_read (convert (ghttp_get_body_len request) i64)))
          ;;(println "HTTP status:" (ghttp_status_code request))
          (if (> bytes_read 0)
              (if (<= bytes_read bufsize)
                  (begin (memcpy buf (ghttp_get_body request) bytes_read)
                         void)
                  (begin
                    (memcpy buf (ghttp_get_body request) bufsize)
                    (println "Warning: HTTP response body (" bytes_read " bytes) is too big for buffer (" bufsize " bytes).  Dropping the rest of the body."))))))))


Back to Index

Similar Entries

  • AudioBuffer    xtlang
  • AudioBuffer    xtlang
  • AudioBuffer    xtlang
  • AudioBuffer    xtlang
  • AudioBuffer    xtlang
  • AudioBuffer_concat    xtlang
  • AudioBuffer_cstring    xtlang
  • AudioBuffer_data_b64    xtlang
  • AudioBuffer_data_b64_cstring    xtlang
  • AudioBuffer_from_aiff    xtlang
  • AudioBuffer_from_wave    xtlang
  • AudioBuffer_malloc    xtlang
  • AudioBuffer_read    xtlang
  • AudioBuffer_read    xtlang
  • AudioBuffer_read_interp    xtlang
  • AudioBuffer_read_interp_mix    xtlang
  • AudioBuffer_read_interp_pw    xtlang
  • AudioBuffer_read_looped    xtlang
  • AudioBuffer_read_looped    xtlang
  • AudioBuffer_set_data_b64    xtlang
  • AudioBuffer_shared_data    xtlang
  • Complex_bufferize    xtlang
  • Complex_bufferize    xtlang
  • Complex_bufferize    xtlang
  • Complex_bufferize    xtlang
  • Complex_unbufferize    xtlang
  • Complex_unbufferize    xtlang
  • Complex_unbufferize    xtlang
  • Complex_unbufferize    xtlang
  • Vcopy    xtlang
  • ai_load_ogl_texture_from_buffer    xtlang
  • array_4_ptr_copy    xtlang
  • astra_start_body    xtlang
  • audiofile_copy_samples    xtlang
  • buffers    xtlang
  • cl:copy-list    scheme
  • cl:tree-copy    scheme
  • copy    xtlang
  • copy    xtlang
  • copy_h    xtlang
  • cpClosestPointOnSegment    xtlang
  • curl_perform_request    xtlang
  • curl_request    xtlang
  • curl_request_with_auth    xtlang
  • curl_request_with_header    xtlang
  • draw_color_body_frame    xtlang
  • draw_color_body_frame_with_hands    xtlang
  • fbo_create_depth_buffer    xtlang
  • fbo_create_depth_buffer_rect    xtlang
  • fill_buffer_with_file    xtlang
  • get_request_handler    xtlang
  • ghttp_perform_DELETE    xtlang
  • ghttp_perform_GET    xtlang
  • ghttp_perform_POST_default    xtlang
  • ghttp_perform_POST_json    xtlang
  • ghttp_perform_POST_string    xtlang
  • ghttp_perform_PUT_default    xtlang
  • ghttp_perform_PUT_json    xtlang
  • ghttp_perform_PUT_string    xtlang
  • ghttp_perform_request_with_setup_fn    xtlang
  • ghttp_print_request_body    xtlang
  • ghttp_print_request_full    xtlang
  • ghttp_print_request_headers    xtlang
  • ghttp_request_body_as_json    xtlang
  • ghttp_set_content_type_html    xtlang
  • ghttp_set_content_type_json    xtlang
  • ghttp_set_content_type_octet_stream    xtlang
  • ghttp_set_content_type_plaintext    xtlang
  • ghttp_set_extempore_user_agent    xtlang
  • glfw_get_framebuffer_height    xtlang
  • glfw_get_framebuffer_width    xtlang
  • glfw_swap_buffers    xtlang
  • hcopy    xtlang
  • hcopy    xtlang
  • impc:ti:get-closure-body    scheme
  • impc:ti:set-closure-body    scheme
  • kinect_print_body    xtlang
  • kinect_update_body    xtlang
  • mcopy    xtlang
  • mcopy    xtlang
  • ocv_copyto    xtlang
  • request    xtlang
  • send_request    xtlang
  • set_sampler_audiobuffer    xtlang
  • set_up_request_socket    xtlang
  • sf_read_file_into_buffer    xtlang
  • string-copy    scheme
  • sys_file_copy    xtlang
  • test_world_copy    xtlang
  • tree-copy    scheme
  • vcopy    xtlang
  • vcopy    xtlang
  • vcopy    xtlang
  • vcopy    xtlang
  • vcopy_pack    xtlang
  • vcopy_pack    xtlang
  • vcopy_unpack    xtlang
  • vcopy_unpack    xtlang
  • world_copy    xtlang
  • xtmtest-result-body    scheme
  • xtmtest-result-body    scheme
  • xtmtest-with-fixture-body    scheme
  • xtmtest-with-fixture-body    scheme
  • zcopy    xtlang
  • zcopy    xtlang
  • zcopy    xtlang
  • zcopy    xtlang
  • zcopy    xtlang
  • zcopy    xtlang
  • zcopy    xtlang
  • zcopy    xtlang
  • zcopy    xtlang