Skip to content

Commit

Permalink
add params (#43770)
Browse files Browse the repository at this point in the history
  • Loading branch information
NanaXiong00 authored Jan 13, 2025
1 parent a596a57 commit 7a84c69
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
* DynamicResponse response = dynamicRequest
* .setUrl("https://petstore.example.com/pet/{petId}") // may already be set if request is created from a client
* .setPathParam("petId", "2343245")
* .setHttpMethod(HttpMethod.POST)
* .send(); // makes the service call
* </pre>
* <!-- end com.azure.core.experimental.http.dynamicrequest.getrequest -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
* DynamicResponse response = dynamicRequest
* .setUrl&#40;&quot;https:&#47;&#47;petstore.example.com&#47;pet&#47;&#123;petId&#125;&quot;&#41; &#47;&#47; may already be set if request is created from a client
* .setPathParam&#40;&quot;petId&quot;, &quot;2343245&quot;&#41;
* .setHttpMethod&#40;HttpMethod.POST&#41;
* .send&#40;&#41;; &#47;&#47; makes the service call
*
* &#47;&#47; Check the HTTP status
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package com.azure.core.experimental.http;

import com.azure.core.http.HttpHeaderName;
import com.azure.core.http.HttpMethod;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.util.BinaryData;
Expand Down Expand Up @@ -41,6 +42,7 @@ public void getRequestSample() {
DynamicResponse response = dynamicRequest
.setUrl("https://petstore.example.com/pet/{petId}") // may already be set if request is created from a client
.setPathParam("petId", "2343245")
.setHttpMethod(HttpMethod.POST)
.send(); // makes the service call
// END: com.azure.core.experimental.http.dynamicrequest.getrequest
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

package com.azure.core.experimental.http;

import com.azure.core.http.HttpMethod;
import com.azure.core.util.BinaryData;
import com.azure.json.models.JsonArray;
import com.azure.json.models.JsonNumber;
Expand All @@ -24,6 +25,7 @@ public void readResponse() {
DynamicResponse response = dynamicRequest
.setUrl("https://petstore.example.com/pet/{petId}") // may already be set if request is created from a client
.setPathParam("petId", "2343245")
.setHttpMethod(HttpMethod.POST)
.send(); // makes the service call

// Check the HTTP status
Expand Down

0 comments on commit 7a84c69

Please sign in to comment.