Skip to content

Commit

Permalink
[C] changed base url from static to dynamic (#1225)
Browse files Browse the repository at this point in the history
* changed basePath from static to dynamic

* removed unnecessary header declaration

* updated sample
  • Loading branch information
zhemant authored and wing328 committed Oct 12, 2018
1 parent 77a821e commit 5780968
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp);
apiClient_t *apiClient_create() {
curl_global_init(CURL_GLOBAL_ALL);
apiClient_t *apiClient = malloc(sizeof(apiClient_t));
apiClient->basePath = "http://petstore.swagger.io:80/v2";
apiClient->basePath = "{{{basePath}}}";
apiClient->dataReceived = NULL;
apiClient->response_code = 0;
#ifdef BASIC_AUTH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "cJSON.h"
#include "list.h"
#include "tag.h"

static listEntry_t *listEntry_create(void *data) {
listEntry_t *createdListEntry = malloc(sizeof(listEntry_t));
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/c/src/apiClient.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ size_t writeDataCallback(void *buffer, size_t size, size_t nmemb, void *userp);
apiClient_t *apiClient_create() {
curl_global_init(CURL_GLOBAL_ALL);
apiClient_t *apiClient = malloc(sizeof(apiClient_t));
apiClient->basePath = "http://petstore.swagger.io:80/v2";
apiClient->basePath = "http://petstore.swagger.io/v2";
apiClient->dataReceived = NULL;
apiClient->response_code = 0;
#ifdef BASIC_AUTH
Expand Down
1 change: 0 additions & 1 deletion samples/client/petstore/c/src/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

#include "cJSON.h"
#include "list.h"
#include "tag.h"

static listEntry_t *listEntry_create(void *data) {
listEntry_t *createdListEntry = malloc(sizeof(listEntry_t));
Expand Down

0 comments on commit 5780968

Please sign in to comment.